EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference

org.eclipse.persistence.tools.schemaframework
Class DatabaseObjectDefinition

java.lang.Object
  extended by org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
IndexDefinition, NestedTableDefinition, PackageDefinition, SequenceDefinition, StoredProcedureDefinition, TableDefinition, TypeDefinition, VarrayDefinition, ViewDefinition

public abstract class DatabaseObjectDefinition
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Purpose: Define a database object for the purpose of creation and deletion. A database object is an entity such as a table, view, proc, sequence...

Responsibilities:

See Also:
Serialized Form

Field Summary
 java.lang.String name
           
 java.lang.String qualifier
           
 
Constructor Summary
DatabaseObjectDefinition()
           
 
Method Summary
abstract  java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Returns the writer used for creation of this object.
abstract  java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Returns the writer used for deletion of this object.
 java.io.Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Sub classes should override.
 java.io.Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Sub classes should override.
 java.io.Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Sub classes should override.
 java.lang.Object clone()
          PUBLIC:
 void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer, java.util.Set<java.lang.String> createdDatabaseSchemas)
          INTERNAL: Execute the DDL to create the database schema for this object.
 void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, java.util.Set<java.lang.String> createdDatabaseSchemas)
          INTERNAL: Execute the DDL to create the database schema for this object.
 void createObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)
          INTERNAL: Either drop from the database directly or write the statement to a file.
 void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Execute the DDL to create this object.
 void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Execute the DDL to drop the database schema for this object.
 void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Execute the DDL to drop the database schema for this object.
 void dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Execute the DDL to drop the object.
 void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter, boolean createSQLFiles)
          INTERNAL: Execute the DDL to drop the object.
 java.lang.String getDatabaseSchema()
          PUBLIC: Return the database schema associated with this database object.
 java.lang.String getFullName()
          INTERNAL: Most major databases support a creator name scope.
 java.lang.String getName()
          PUBLIC: Return the name of the object.
 java.lang.String getQualifier()
          PUBLIC: Most major databases support a creator name scope.
protected  boolean hasDatabaseSchema()
          INTERNAL: Return true is this database object definition has a schema definition.
 void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer createSchemaWriter, boolean createSQLFiles)
          Execute any statements required after the creation of the object
 void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer dropSchemaWriter, boolean createSQLFiles)
          Execute any statements required before the deletion of the object
 void setName(java.lang.String name)
          PUBLIC: Set the name of the object.
 void setQualifier(java.lang.String qualifier)
          PUBLIC: Most major databases support a creator name scope.
 boolean shouldCreateDatabaseSchema(java.util.Set<java.lang.String> createdDatabaseSchemas)
          INTERNAL: Subclasses who care should override this method, e.g.
 boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Subclasses who care should override this method.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name

qualifier

public java.lang.String qualifier
Constructor Detail

DatabaseObjectDefinition

public DatabaseObjectDefinition()
Method Detail

buildCreationWriter

public abstract java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                   java.io.Writer writer)
                                            throws ValidationException
INTERNAL: Returns the writer used for creation of this object.

Throws:
ValidationException

buildVPDCreationPolicyWriter

public java.io.Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                   java.io.Writer writer)
INTERNAL: Sub classes should override.


buildVPDCreationFunctionWriter

public java.io.Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                     java.io.Writer writer)
INTERNAL: Sub classes should override.


buildVPDDeletionWriter

public java.io.Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                             java.io.Writer writer)
INTERNAL: Sub classes should override.


buildDeletionWriter

public abstract java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                   java.io.Writer writer)
                                            throws ValidationException
INTERNAL: Returns the writer used for deletion of this object.

Throws:
ValidationException

clone

public java.lang.Object clone()
PUBLIC:

Overrides:
clone in class java.lang.Object

createDatabaseSchema

public void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                 java.io.Writer writer,
                                 java.util.Set<java.lang.String> createdDatabaseSchemas)
                          throws EclipseLinkException
INTERNAL: Execute the DDL to create the database schema for this object. Does nothing at this level, subclasses that support this must override this method.

Throws:
EclipseLinkException
See Also:
TableDefinition

createDatabaseSchemaOnDatabase

public void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                           java.util.Set<java.lang.String> createdDatabaseSchemas)
                                    throws EclipseLinkException
INTERNAL: Execute the DDL to create the database schema for this object. Does nothing at this level, subclasses that support this must override this method.

Throws:
EclipseLinkException
See Also:
TableDefinition

createObject

public void createObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
                         java.io.Writer schemaWriter)
                  throws EclipseLinkException
INTERNAL: Either drop from the database directly or write the statement to a file. Database objects are root level entities such as tables, views, procs, sequences...

Throws:
EclipseLinkException

createOnDatabase

public void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws EclipseLinkException
INTERNAL: Execute the DDL to create this object.

Throws:
EclipseLinkException

shouldCreateDatabaseSchema

public boolean shouldCreateDatabaseSchema(java.util.Set<java.lang.String> createdDatabaseSchemas)
INTERNAL: Subclasses who care should override this method, e.g. TableDefinition.


shouldCreateVPDCalls

public boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Subclasses who care should override this method.


dropDatabaseSchema

public void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session,
                               java.io.Writer writer)
                        throws EclipseLinkException
INTERNAL: Execute the DDL to drop the database schema for this object. Does nothing at this level, subclasses that support this must override this method.

Throws:
EclipseLinkException
See Also:
TableDefinition

dropDatabaseSchemaOnDatabase

public void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                                  throws EclipseLinkException
INTERNAL: Execute the DDL to drop the database schema for this object. Does nothing at this level, subclasses that support this must override this method.

Throws:
EclipseLinkException
See Also:
TableDefinition

dropFromDatabase

public void dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws EclipseLinkException
INTERNAL: Execute the DDL to drop the object.

Throws:
EclipseLinkException

dropObject

public void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.io.Writer schemaWriter,
                       boolean createSQLFiles)
                throws EclipseLinkException
INTERNAL: Execute the DDL to drop the object. Either directly from the database of write out the statement to a file.

Throws:
EclipseLinkException

getDatabaseSchema

public java.lang.String getDatabaseSchema()
PUBLIC: Return the database schema associated with this database object.

See Also:
TableDefinition

getFullName

public java.lang.String getFullName()
INTERNAL: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified.


getName

public java.lang.String getName()
PUBLIC: Return the name of the object. i.e. the table name or the sequence name.


getQualifier

public java.lang.String getQualifier()
PUBLIC: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified.


hasDatabaseSchema

protected boolean hasDatabaseSchema()
INTERNAL: Return true is this database object definition has a schema definition.


postCreateObject

public void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
                             java.io.Writer createSchemaWriter,
                             boolean createSQLFiles)
Execute any statements required after the creation of the object

Parameters:
session -
createSchemaWriter -

preDropObject

public void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
                          java.io.Writer dropSchemaWriter,
                          boolean createSQLFiles)
Execute any statements required before the deletion of the object

Parameters:
session -
dropSchemaWriter -

setName

public void setName(java.lang.String name)
PUBLIC: Set the name of the object. i.e. the table name or the sequence name.


setQualifier

public void setQualifier(java.lang.String qualifier)
PUBLIC: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference