Module eclipselink
Class DatabaseObjectDefinition
java.lang.Object
org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
ConstraintObjectDefinition,IndexDefinition,NestedTableDefinition,PackageDefinition,SequenceDefinition,StoredProcedureDefinition,TableDefinition,TypeDefinition,VarrayDefinition,ViewDefinition
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:
- Be able to create and drop the object from the database.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedprotectedDatabaseObjectDefinition(String name, String qualifier) -
Method Summary
Modifier and TypeMethodDescriptionabstract WriterbuildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.abstract WriterbuildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.clone()voidcreateDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voiddropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.voiddropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voiddropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voiddropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.Return the database schema associated with this database object.INTERNAL: Most major databases support a creator name scope.getName()Return the name of the object.Most major databases support a creator name scope.protected booleanINTERNAL: Return true is this database object definition has a schema definition.voidpostCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.voidpreDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.voidSet the name of the object.voidsetQualifier(String qualifier) Most major databases support a creator name scope.booleanshouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas) INTERNAL: Subclasses who care should override this method, e.g.booleanshouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.toString()
-
Constructor Details
-
DatabaseObjectDefinition
protected DatabaseObjectDefinition() -
DatabaseObjectDefinition
-
DatabaseObjectDefinition
-
-
Method Details
-
buildCreationWriter
@Deprecated(forRemoval=true, since="4.0.9") public abstract Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Returns the writer used for creation of this object.- Throws:
ValidationException
-
buildVPDCreationPolicyWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Sub classes should override. -
buildVPDCreationFunctionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Sub classes should override. -
buildVPDDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Sub classes should override. -
buildDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public abstract Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Returns the writer used for deletion of this object.- Throws:
ValidationException
-
clone
-
createDatabaseSchema
@Deprecated(forRemoval=true, since="4.0.9") public void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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:
-
createDatabaseSchemaOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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:
-
createObject
@Deprecated(forRemoval=true, since="4.0.9") public void createObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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
@Deprecated(forRemoval=true, since="4.0.9") public void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to create this object.- Throws:
EclipseLinkException
-
shouldCreateDatabaseSchema
INTERNAL: Subclasses who care should override this method, e.g. TableDefinition. -
shouldCreateVPDCalls
@Deprecated(forRemoval=true, since="4.0.9") public boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Subclasses who care should override this method. -
dropDatabaseSchema
@Deprecated(forRemoval=true, since="4.0.9") public void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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:
-
dropDatabaseSchemaOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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:
-
dropFromDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to drop the object.- Throws:
EclipseLinkException
-
dropObject
@Deprecated(forRemoval=true, since="4.0.9") public void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to drop the object. Either directly from the database of write out the statement to a file.- Throws:
EclipseLinkException
-
getDatabaseSchema
Return the database schema associated with this database object.- See Also:
-
getFullName
INTERNAL: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified. -
getName
Return the name of the object. i.e. the table name or the sequence name. -
getQualifier
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
@Deprecated(forRemoval=true, since="4.0.9") public void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.Execute any statements required after the creation of the object -
preDropObject
@Deprecated(forRemoval=true, since="4.0.9") public void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.Execute any statements required before the deletion of the object -
setName
Set the name of the object. i.e. the table name or the sequence name. -
setQualifier
Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified. -
toString
-