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:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
     
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Writer
    buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)
    Deprecated, for removal: This API element is subject to removal in a future version.
    abstract Writer
    buildDeletionWriter(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.
     
    void
    createDatabaseSchema(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.
    void
    createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    createObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    dropObject(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.
    Return the name of the object.
    Most major databases support a creator name scope.
    protected boolean
    INTERNAL: Return true is this database object definition has a schema definition.
    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.
    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.
    void
    Set the name of the object.
    void
    setQualifier(String qualifier)
    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)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DatabaseObjectDefinition

      protected DatabaseObjectDefinition()
    • DatabaseObjectDefinition

      protected DatabaseObjectDefinition(String name)
    • DatabaseObjectDefinition

      protected DatabaseObjectDefinition(String name, String qualifier)
  • 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

      public Object clone()
      Overrides:
      clone in class Object
    • 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

      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:
    • 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

      public String getDatabaseSchema()
      Return the database schema associated with this database object.
      See Also:
    • 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()
      Return the name of the object. i.e. the table name or the sequence name.
    • getQualifier

      public String 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

      public void setName(String name)
      Set the name of the object. i.e. the table name or the sequence name.
    • setQualifier

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

      public String toString()
      Overrides:
      toString in class Object