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:
Constructor and Description |
---|
DatabaseObjectDefinition() |
Modifier and Type | Method and Description |
---|---|
abstract Writer |
buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer)
INTERNAL:
Returns the writer used for creation of this object.
|
abstract Writer |
buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer)
INTERNAL:
Returns the writer used for deletion of this object.
|
Writer |
buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer)
INTERNAL:
Sub classes should override.
|
Writer |
buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer)
INTERNAL:
Sub classes should override.
|
Writer |
buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer)
INTERNAL:
Sub classes should override.
|
Object |
clone()
PUBLIC:
|
void |
createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer writer,
Set<String> createdDatabaseSchemas)
INTERNAL:
Execute the DDL to create the database schema for this object.
|
void |
createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session,
Set<String> createdDatabaseSchemas)
INTERNAL:
Execute the DDL to create the database schema for this object.
|
void |
createObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
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,
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,
Writer schemaWriter,
boolean createSQLFiles)
INTERNAL:
Execute the DDL to drop the object.
|
String |
getDatabaseSchema()
PUBLIC:
Return the database schema associated with this database object.
|
String |
getFullName()
INTERNAL:
Most major databases support a creator name scope.
|
String |
getName()
PUBLIC:
Return the name of the object.
|
String |
getQualifier()
PUBLIC:
Most major databases support a creator name scope.
|
void |
postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer createSchemaWriter,
boolean createSQLFiles)
Execute any statements required after the creation of the object
|
void |
preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
Writer dropSchemaWriter,
boolean createSQLFiles)
Execute any statements required before the deletion of the object
|
void |
setName(String name)
PUBLIC:
Set the name of the object.
|
void |
setQualifier(String qualifier)
PUBLIC:
Most major databases support a creator name scope.
|
boolean |
shouldCreateDatabaseSchema(Set<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.
|
String |
toString() |
public abstract Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException
ValidationException
public Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)
public Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)
public Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)
public abstract Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException
ValidationException
public void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) throws EclipseLinkException
EclipseLinkException
TableDefinition
public void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) throws EclipseLinkException
EclipseLinkException
TableDefinition
public void createObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException
EclipseLinkException
public void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException
EclipseLinkException
public boolean shouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas)
public boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session)
public void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws EclipseLinkException
EclipseLinkException
TableDefinition
public void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException
EclipseLinkException
TableDefinition
public void dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException
EclipseLinkException
public void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException
EclipseLinkException
public String getDatabaseSchema()
TableDefinition
public String getFullName()
public String getName()
public String getQualifier()
public void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles)
session
- createSchemaWriter
- public void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles)
session
- dropSchemaWriter
- public void setName(String name)
public void setQualifier(String qualifier)