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
public abstract class DatabaseObjectDefinition extends Object implements Cloneable, 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:
- Be able to create and drop the object from the database.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description StringnameDeprecated, for removal: This API element is subject to removal in a future version.Use getName() and setName(String) instead.StringqualifierDeprecated, for removal: This API element is subject to removal in a future version.Use getQualifier() and setQualifier(String) instead.
-
Constructor Summary
Constructors Modifier Constructor Description protectedDatabaseObjectDefinition()protectedDatabaseObjectDefinition(String name)protectedDatabaseObjectDefinition(String name, String qualifier)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract 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.WriterbuildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)Deprecated, for removal: This API element is subject to removal in a future version.WriterbuildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)Deprecated, for removal: This API element is subject to removal in a future version.WriterbuildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)Deprecated, for removal: This API element is subject to removal in a future version.Objectclone()PUBLIC: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.StringgetDatabaseSchema()PUBLIC: Return the database schema associated with this database object.protected static org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinitiongetFieldTypeDefinition(org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform, Class<?> type, String name)Deprecated, for removal: This API element is subject to removal in a future version.protected static org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinitiongetFieldTypeDefinition(org.eclipse.persistence.internal.sessions.AbstractSession session, Class<?> type, String name)Deprecated, for removal: This API element is subject to removal in a future version.StringgetFullName()INTERNAL: Most major databases support a creator name scope.StringgetName()PUBLIC: Return the name of the object.StringgetQualifier()PUBLIC: Most major databases support a creator name scope.protected booleanhasDatabaseSchema()INTERNAL: 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.voidsetName(String name)PUBLIC: Set the name of the object.voidsetQualifier(String qualifier)PUBLIC: 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.StringtoString()
-
-
-
Field Detail
-
name
@Deprecated(forRemoval=true, since="4.0.9") public String name
Deprecated, for removal: This API element is subject to removal in a future version.Use getName() and setName(String) instead.
-
qualifier
@Deprecated(forRemoval=true, since="4.0.9") public String qualifier
Deprecated, for removal: This API element is subject to removal in a future version.Use getQualifier() and setQualifier(String) instead.
-
-
Method Detail
-
getFieldTypeDefinition
@Deprecated(forRemoval=true, since="4.0.9") protected static final org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition getFieldTypeDefinition(org.eclipse.persistence.internal.sessions.AbstractSession session, Class<?> type, String name)
Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Retrieve a database platform specific definition from session for existing type instance or build a new one when type isnull.- Parameters:
session- Session to search for already existing instances.type- Field type class.name- Filed type name.- Returns:
- Database platform specific definition instance.
- Throws:
ValidationException- when provided type is not valid database type.
-
getFieldTypeDefinition
@Deprecated(forRemoval=true, since="4.0.9") protected static final org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition getFieldTypeDefinition(org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform, Class<?> type, String name)
Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Retrieve database platform specific field definition from database specific platform handler for existing type or build a new one when type isnulland type for type name could not be found.- Parameters:
platform- Specific database platform handler.type- Field type (will be processed first when available).name- Field type name (will be processed as backup option when type class is not available).- Throws:
ValidationException- when provided type is not valid database type.
-
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
-
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:
TableDefinition
-
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:
TableDefinition
-
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
public boolean shouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas)
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:
TableDefinition
-
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:
TableDefinition
-
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
public String getDatabaseSchema()
PUBLIC: Return the database schema associated with this database object.- See Also:
TableDefinition
-
getFullName
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
public String getName()
PUBLIC: Return the name of the object. i.e. the table name or the sequence name.
-
getQualifier
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
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
public void setName(String name)
PUBLIC: Set the name of the object. i.e. the table name or the sequence name.
-
setQualifier
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.
-
-