|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.tools.schemaframework.SchemaManager
Purpose: Define all user level protocol for development time database manipulation.
Responsibilities:
Constructor Summary | |
SchemaManager(oracle.toplink.publicinterface.DatabaseSession session) |
|
SchemaManager(DatabaseSession session) |
Method Summary | |
void |
alterSequence(SequenceDefinition sequenceDefinition) Use the definition to alter sequence. |
void |
appendToDDLWriter(java.lang.String stringToWrite) PUBLIC: If the schema manager is writing to a writer, append this string to that writer. |
void |
closeDDLWriter() PUBLIC: Close the schema writer. |
void |
createConstraints(TableDefinition tableDefinition) Use the table definition to add the constraints to the database, this is normally done in two steps to avoid dependencies. |
void |
createObject(DatabaseObjectDefinition databaseObjectDefinition) Use the definition object to create the schema entity on the database. |
void |
createSequences() Create all the receiver's sequences on the database for all of the loaded descriptors. |
void |
dropConstraints(TableDefinition tableDefinition) Use the table definition to drop the constraints from the table, this is normally done in two steps to avoid dependencies. |
void |
dropObject(DatabaseObjectDefinition databaseObjectDefinition) Use the definition object to drop the schema entity from the database. |
void |
dropPre25Constraints(TableDefinition tableDefinition) Deprecated. Only used for transition to TLJ 2.5 table creation |
void |
dropTable(java.lang.String tableName) Drop (delete) the table named tableName from the database. |
void |
generateStoredProcedures() PUBLIC: Use this method to generate stored procedures based on the dynamic SQL generated for your mappings and descriptors. |
void |
generateStoredProcedures(java.io.Writer writer) PUBLIC: Use this method to generate stored procedures based on the dynamic SQL generated for your mappings and descriptors. |
void |
generateStoredProceduresAndAmendmentClass(java.lang.String path, java.lang.String fullyQualifiedClassName) PUBLIC: Use this method to generate stored procedures based on the dynamic SQL generated for your mappings and descriptors. |
void |
generateStoredProceduresAndAmendmentClass(java.io.Writer writer, java.lang.String fullyQualifiedClassName) PUBLIC: Use this method to generate stored procedures based on the dynamic SQL generated for your mappings and descriptors. |
java.util.Vector |
getAllColumnNames(java.lang.String tableName) Return all the column names for the given tableName. |
java.util.Vector |
getAllColumnNames(java.lang.String creatorName, java.lang.String tableName) Return all the column names for the given tableName and creator. |
java.util.Vector |
getAllTableNames() Return all the table names on the database A DatabaseException is thrown if the database does not support the querying of metadata. |
java.util.Vector |
getAllTableNames(java.lang.String creatorName) Return all the table names on the database for the given creator e.g. getAllTableNames("USERID") A DatabaseException is thrown if the database does not support the querying of metadata. |
java.util.Vector |
getColumnInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String columnName) Get a description of table columns available in a catalog. |
oracle.toplink.publicinterface.Session |
getSession() |
java.util.Vector |
getTableInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String[] types) Get a description of tables available in a catalog. |
void |
outputDDLToDatabase() PUBLIC: Output all DDL statements directly to the database. |
void |
outputDDLToFile(java.lang.String fileName) PUBLIC: Output all DDL statements to a file writer specified by the name in the parameter. |
void |
outputDDLToWriter(java.io.Writer schemaWriter) PUBLIC: Output all DDL statements to a writer specified in the parameter. |
void |
replaceObject(DatabaseObjectDefinition databaseDefinition) Use the definition object to drop and recreate the schema entity on the database. |
void |
replaceSequences() Drop and recreate all the receiver's sequences on the database for all of the loaded descriptors. |
void |
setSession(oracle.toplink.publicinterface.DatabaseSession session) |
boolean |
shouldWriteToDatabase() PUBLIC: Return true if this SchemaManager should write to the database directly |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchemaManager(oracle.toplink.publicinterface.DatabaseSession session)
public SchemaManager(DatabaseSession session)
Method Detail |
public void appendToDDLWriter(java.lang.String stringToWrite)
public void closeDDLWriter()
public void createConstraints(TableDefinition tableDefinition) throws TopLinkException
TopLinkException
public void createObject(DatabaseObjectDefinition databaseObjectDefinition) throws TopLinkException
TopLinkException
public void createSequences() throws TopLinkException
TopLinkException
public void dropConstraints(TableDefinition tableDefinition) throws TopLinkException
TopLinkException
public void dropObject(DatabaseObjectDefinition databaseObjectDefinition) throws TopLinkException
TopLinkException
public void dropPre25Constraints(TableDefinition tableDefinition) throws TopLinkException
TopLinkException
public void dropTable(java.lang.String tableName) throws TopLinkException
TopLinkException
public void generateStoredProcedures() throws TopLinkException
TopLinkException
outputDDLToWriter
public void generateStoredProcedures(java.io.Writer writer) throws TopLinkException
TopLinkException
outputDDLToWriter
public void generateStoredProceduresAndAmendmentClass(java.io.Writer writer, java.lang.String fullyQualifiedClassName) throws TopLinkException
TopLinkException
outputDDLToWriter
public void generateStoredProceduresAndAmendmentClass(java.lang.String path, java.lang.String fullyQualifiedClassName) throws TopLinkException
TopLinkException
outputDDLToWriter
public java.util.Vector getAllColumnNames(java.lang.String tableName) throws DatabaseException
DatabaseException
public java.util.Vector getAllColumnNames(java.lang.String creatorName, java.lang.String tableName) throws DatabaseException
DatabaseException
public java.util.Vector getAllTableNames() throws DatabaseException
DatabaseException
public java.util.Vector getAllTableNames(java.lang.String creatorName) throws DatabaseException
DatabaseException
public java.util.Vector getColumnInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String columnName) throws DatabaseException
Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
Each column description has the following columns:
catalog
- a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteriaDatabaseException
public oracle.toplink.publicinterface.Session getSession()
public java.util.Vector getTableInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String[] types) throws DatabaseException
Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
Each table description has the following columns:
Note: Some databases may not return information for all tables.
catalog
- a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteriatypes
- a list of table types to include; null returns all typesDatabaseException
public void outputDDLToDatabase()
public void outputDDLToFile(java.lang.String fileName)
public void outputDDLToWriter(java.io.Writer schemaWriter)
public void replaceObject(DatabaseObjectDefinition databaseDefinition) throws TopLinkException
TopLinkException
public void replaceSequences() throws DatabaseException
DatabaseException
public void setSession(oracle.toplink.publicinterface.DatabaseSession session)
public boolean shouldWriteToDatabase()
public void alterSequence(SequenceDefinition sequenceDefinition) throws TopLinkException
TopLinkException
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |