|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.tools.schemaframework.SchemaManager
public class SchemaManager
Purpose: Define all user level protocol for development time database manipulation.
Responsibilities:
Field Summary | |
---|---|
static boolean |
FAST_TABLE_CREATOR
Allow table creator to occur "fast" by just deleting all the rows. |
Constructor Summary | |
---|---|
SchemaManager(DatabaseSession session)
|
|
SchemaManager(oracle.toplink.internal.sessions.DatabaseSessionImpl session)
|
Method Summary | |
---|---|
void |
alterSequence(SequenceDefinition sequenceDefinition)
Use the definition to alter sequence. |
void |
appendToDDLWriter(java.lang.String stringToWrite)
If the schema manager is writing to a writer, append this string to that writer. |
void |
appendToDDLWriter(java.io.Writer schemaWriter,
java.lang.String stringToWrite)
|
void |
closeDDLWriter()
Close the schema writer. |
void |
closeDDLWriter(java.io.Writer schemaWriter)
|
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 |
createDefaultTables(boolean generateFKConstraints)
Create the default table schema for the TopLink project this session associated with. |
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 |
dropTable(java.lang.String tableName)
Drop (delete) the table named tableName from the database. |
void |
generateStoredProcedures()
Use this method to generate stored procedures based on the dynamic SQL generated for your mappings and descriptors. |
void |
generateStoredProcedures(java.io.Writer writer)
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)
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)
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)
Get a description of table columns available in a catalog. |
java.util.Vector |
getAllColumnNames(java.lang.String creatorName,
java.lang.String tableName)
Get a description of table columns available in a catalog. |
java.util.Vector |
getAllTableNames()
Get a description of tables available in a catalog. |
java.util.Vector |
getAllTableNames(java.lang.String creatorName)
Get a description of table columns available in a catalog. |
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.internal.sessions.AbstractSession |
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 |
outputCreateDDLToFile(java.lang.String fileName)
|
void |
outputCreateDDLToWriter(java.io.Writer createWriter)
|
void |
outputDDLToDatabase()
Output all DDL statements directly to the database. |
void |
outputDDLToFile(java.lang.String fileName)
Output all DDL statements to a file writer specified by the name in the parameter. |
void |
outputDDLToWriter(java.io.Writer schemaWriter)
Output all DDL statements to a writer specified in the parameter. |
void |
outputDropDDLToFile(java.lang.String fileName)
|
void |
outputDropDDLToWriter(java.io.Writer dropWriter)
|
void |
replaceDefaultTables()
Drop and recreate the default table schema for the TopLink project this session associated with. |
void |
replaceDefaultTables(boolean keepSequenceTables,
boolean generateFKConstraints)
Drop and recreate the default table schema for the TopLink project this session associated with. |
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 |
setCreateSQLFiles(boolean genFlag)
|
void |
setSession(oracle.toplink.internal.sessions.DatabaseSessionImpl session)
|
boolean |
shouldWriteToDatabase()
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 |
Field Detail |
---|
public static boolean FAST_TABLE_CREATOR
SchemaManager
Constructor Detail |
---|
public SchemaManager(oracle.toplink.internal.sessions.DatabaseSessionImpl session)
public SchemaManager(DatabaseSession session)
Method Detail |
---|
public void appendToDDLWriter(java.lang.String stringToWrite)
public void appendToDDLWriter(java.io.Writer schemaWriter, java.lang.String stringToWrite)
public void closeDDLWriter()
public void closeDDLWriter(java.io.Writer schemaWriter)
public void createConstraints(TableDefinition tableDefinition) throws TopLinkException
TopLinkException
public void createObject(DatabaseObjectDefinition databaseObjectDefinition) throws TopLinkException
TopLinkException
public void createSequences() throws TopLinkException
TopLinkException
public void setCreateSQLFiles(boolean genFlag)
public void replaceSequences() throws TopLinkException
TopLinkException
public void dropConstraints(TableDefinition tableDefinition) throws TopLinkException
TopLinkException
public void dropObject(DatabaseObjectDefinition databaseObjectDefinition) throws TopLinkException
TopLinkException
public void dropTable(java.lang.String tableName) throws TopLinkException
TopLinkException
public void generateStoredProcedures() throws TopLinkException
TopLinkException
public void generateStoredProcedures(java.io.Writer writer) throws TopLinkException
TopLinkException
public void generateStoredProceduresAndAmendmentClass(java.io.Writer writer, java.lang.String fullyQualifiedClassName) throws TopLinkException
TopLinkException
public void generateStoredProceduresAndAmendmentClass(java.lang.String path, java.lang.String fullyQualifiedClassName) throws TopLinkException
TopLinkException
public java.util.Vector getAllColumnNames(java.lang.String tableName) throws DatabaseException
Each column description has the following columns:
tableName
- a table name pattern
DatabaseException
public java.util.Vector getAllColumnNames(java.lang.String creatorName, java.lang.String tableName) throws DatabaseException
Each column description has the following columns:
creatorName
- a schema name pattern; "" retrieves those
without a schematableName
- a table name pattern
DatabaseException
public java.util.Vector getAllTableNames() throws DatabaseException
Each table description has the following columns:
Note: Some databases may not return information for all tables.
DatabaseException
public java.util.Vector getAllTableNames(java.lang.String creatorName) throws DatabaseException
Each column description has the following columns:
creatorName
- a schema name pattern; "" retrieves those
without a schema
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 criteriaschema
- a schema name pattern; "" retrieves those
without a schematableName
- a table name patterncolumnName
- a column name pattern
DatabaseException
public oracle.toplink.internal.sessions.AbstractSession 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 criteriaschema
- a schema name pattern; "" retrieves those
without a schematableName
- a table name patterntypes
- a list of table types to include; null returns all types
DatabaseException
public void outputDDLToDatabase()
public void outputDDLToFile(java.lang.String fileName)
public void outputCreateDDLToFile(java.lang.String fileName)
public void outputDropDDLToFile(java.lang.String fileName)
public void outputDDLToWriter(java.io.Writer schemaWriter)
public void outputCreateDDLToWriter(java.io.Writer createWriter)
public void outputDropDDLToWriter(java.io.Writer dropWriter)
public void replaceObject(DatabaseObjectDefinition databaseDefinition) throws TopLinkException
TopLinkException
public void createDefaultTables(boolean generateFKConstraints)
public void replaceDefaultTables() throws TopLinkException
TopLinkException
public void replaceDefaultTables(boolean keepSequenceTables, boolean generateFKConstraints) throws TopLinkException
TopLinkException
public void setSession(oracle.toplink.internal.sessions.DatabaseSessionImpl 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 |