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:
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Writer | buildCreationWriter(AbstractSession session, Writer writer)
INTERNAL: Returns the writer used for creation of this object. |
| public abstract Writer | buildDeletionWriter(AbstractSession session, Writer writer)
INTERNAL: Returns the writer used for deletion of this object. |
| public Writer | buildVPDCreationFunctionWriter(AbstractSession session, Writer writer)
INTERNAL: Sub classes should override. |
| public Writer | buildVPDCreationPolicyWriter(AbstractSession session, Writer writer)
INTERNAL: Sub classes should override. |
| public Writer | buildVPDDeletionWriter(AbstractSession session, Writer writer)
INTERNAL: Sub classes should override. |
| public Object | |
| public void | createDatabaseSchema(AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas)
INTERNAL: Execute the DDL to create the database schema for this object. |
| public void | createDatabaseSchemaOnDatabase(AbstractSession session, Set<String> createdDatabaseSchemas)
INTERNAL: Execute the DDL to create the database schema for this object. |
| public void | createObject(AbstractSession session, Writer schemaWriter)
INTERNAL: Either drop from the database directly or write the statement to a file. |
| public void | |
| public void | dropDatabaseSchema(AbstractSession session, Writer writer)
INTERNAL: Execute the DDL to drop the database schema for this object. |
| public void | dropDatabaseSchemaOnDatabase(AbstractSession session)
INTERNAL: Execute the DDL to drop the database schema for this object. |
| public void | |
| public void | dropObject(AbstractSession session, Writer schemaWriter, boolean createSQLFiles)
INTERNAL: Execute the DDL to drop the object. |
| public String | |
| protected static final FieldTypeDefinition | Returns: Database platform specific definition instance.Session to search for already existing instances. session, final Class<?> Field type class. type, final String Filed type name. name)INTERNAL:
Retrieve a database platform specific definition from session for
existing type instance or build a new one when type is |
| protected static final FieldTypeDefinition | getFieldTypeDefinition(final DatabasePlatform
Specific database platform handler. platform, final Class<?> Field type (will be processed first when available). type, final String Field type name (will be processed as backup option when
type class is not available). name)INTERNAL:
Retrieve database platform specific field definition from database
specific platform handler for existing type or build a new one when type
is |
| public String | |
| public String | |
| public String | |
| protected boolean | hasDatabaseSchema()
INTERNAL: Return true is this database object definition has a schema definition. |
| public void | postCreateObject(AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles)
Execute any statements required after the creation of the object |
| public void | preDropObject(AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles)
Execute any statements required before the deletion of the object |
| public void | |
| public void | |
| public boolean | shouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas)
INTERNAL: Subclasses who care should override this method, e.g. TableDefinition. |
| public boolean | shouldCreateVPDCalls(AbstractSession session)
INTERNAL: Subclasses who care should override this method. |
| public String |
| name | back to summary |
|---|---|
| public String name | |
| qualifier | back to summary |
|---|---|
| public String qualifier | |
| DatabaseObjectDefinition | back to summary |
|---|---|
| protected DatabaseObjectDefinition() | |
| buildCreationWriter | back to summary |
|---|---|
| public abstract Writer buildCreationWriter(AbstractSession session, Writer writer) throws ValidationException INTERNAL: Returns the writer used for creation of this object. | |
| buildDeletionWriter | back to summary |
|---|---|
| public abstract Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException INTERNAL: Returns the writer used for deletion of this object. | |
| buildVPDCreationFunctionWriter | back to summary |
|---|---|
| public Writer buildVPDCreationFunctionWriter(AbstractSession session, Writer writer) INTERNAL: Sub classes should override. | |
| buildVPDCreationPolicyWriter | back to summary |
|---|---|
| public Writer buildVPDCreationPolicyWriter(AbstractSession session, Writer writer) INTERNAL: Sub classes should override. | |
| buildVPDDeletionWriter | back to summary |
|---|---|
| public Writer buildVPDDeletionWriter(AbstractSession session, Writer writer) INTERNAL: Sub classes should override. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. PUBLIC:
| |
| createDatabaseSchema | back to summary |
|---|---|
| public void createDatabaseSchema(AbstractSession session, Writer writer, Set<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.
| |
| createDatabaseSchemaOnDatabase | back to summary |
|---|---|
| public void createDatabaseSchemaOnDatabase(AbstractSession session, Set<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.
| |
| createObject | back to summary |
|---|---|
| public void createObject(AbstractSession session, 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... | |
| createOnDatabase | back to summary |
|---|---|
| public void createOnDatabase(AbstractSession session) throws EclipseLinkException INTERNAL: Execute the DDL to create this object. | |
| dropDatabaseSchema | back to summary |
|---|---|
| public void dropDatabaseSchema(AbstractSession session, 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.
| |
| dropDatabaseSchemaOnDatabase | back to summary |
|---|---|
| public void dropDatabaseSchemaOnDatabase(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.
| |
| dropFromDatabase | back to summary |
|---|---|
| public void dropFromDatabase(AbstractSession session) throws EclipseLinkException INTERNAL: Execute the DDL to drop the object. | |
| dropObject | back to summary |
|---|---|
| public void dropObject(AbstractSession session, 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. | |
| getDatabaseSchema | back to summary |
|---|---|
| public String getDatabaseSchema() PUBLIC: Return the database schema associated with this database object.
| |
| getFieldTypeDefinition | back to summary |
|---|---|
| protected static final FieldTypeDefinition getFieldTypeDefinition(final AbstractSession session, final Class<?> type, final String name) INTERNAL:
Retrieve a database platform specific definition from session for
existing type instance or build a new one when type is
| |
| getFieldTypeDefinition | back to summary |
|---|---|
| protected static final FieldTypeDefinition getFieldTypeDefinition(final DatabasePlatform platform, final Class<?> type, final String name) INTERNAL:
Retrieve database platform specific field definition from database
specific platform handler for existing type or build a new one when type
is
| |
| getFullName | back to summary |
|---|---|
| public String getFullName() INTERNAL: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified. | |
| getName | back to summary |
|---|---|
| public String getName() PUBLIC: Return the name of the object. i.e. the table name or the sequence name. | |
| getQualifier | back to summary |
|---|---|
| public String getQualifier() PUBLIC: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified. | |
| hasDatabaseSchema | back to summary |
|---|---|
| protected boolean hasDatabaseSchema() INTERNAL: Return true is this database object definition has a schema definition. | |
| postCreateObject | back to summary |
|---|---|
| public void postCreateObject(AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Execute any statements required after the creation of the object | |
| preDropObject | back to summary |
|---|---|
| public void preDropObject(AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Execute any statements required before the deletion of the object | |
| setName | back to summary |
|---|---|
| public void setName(String name) PUBLIC: Set the name of the object. i.e. the table name or the sequence name. | |
| setQualifier | back to summary |
|---|---|
| public void setQualifier(String qualifier) PUBLIC: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified. | |
| shouldCreateDatabaseSchema | back to summary |
|---|---|
| public boolean shouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas) INTERNAL: Subclasses who care should override this method, e.g. TableDefinition. | |
| shouldCreateVPDCalls | back to summary |
|---|---|
| public boolean shouldCreateVPDCalls(AbstractSession session) INTERNAL: Subclasses who care should override this method. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |