Package org.apache.empire.dbms.oracle
Class OracleDDLGenerator
java.lang.Object
org.apache.empire.db.DBDDLGenerator<DBMSHandlerOracle>
org.apache.empire.dbms.oracle.OracleDDLGenerator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.empire.db.DBDDLGenerator
DBDDLGenerator.DDLActionType -
Field Summary
Fields inherited from class org.apache.empire.db.DBDDLGenerator
alterColumnPhrase, databaseObjectName, DATATYPE_BLOB, DATATYPE_BOOLEAN, DATATYPE_CHAR, DATATYPE_CLOB, DATATYPE_DATE, DATATYPE_DATETIME, DATATYPE_DECIMAL, DATATYPE_FLOAT, DATATYPE_INT_BIG, DATATYPE_INT_SMALL, DATATYPE_INTEGER, DATATYPE_TIME, DATATYPE_TIMESTAMP, DATATYPE_UNIQUEID, DATATYPE_VARCHAR, dbms, ddlColumnDefaults, log, namePrimaryKeyConstraint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCreateIndexStmt(DBIndex index, DBSQLBuilder sql, DBSQLScript script) protected voidaddCreateTableStmt(DBTable table, DBSQLBuilder sql, DBSQLScript script) protected voidaddCreateViewStmt(DBView v, DBSQLBuilder sql, DBSQLScript script) protected booleanappendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql) appends the data type of a columnprotected voidappendColumnDesc(DBTableColumn c, boolean alter, DBSQLBuilder sql) Appends a table column definition to a ddl statementprotected voidappendIndexColumn(DBIndex index, DBColumnExpr idxColumn, DBSQLBuilder sql) Appends an column expression to an indexprotected voidcreateComment(DBDatabase db, String type, DBExpr expr, String comment, DBSQLScript script) protected voidcreateDatabase(DBDatabase db, DBSQLScript script) Appends the DDL-Script for creating the given database to an SQL-Script
This includes the generation of all tables, views and relations.protected voidcreateSequence(DBDatabase db, DBTableColumn column, DBSQLScript script) Returns true if the sequence has been created successfully.protected voidcreateTable(DBTable t, DBSQLScript script) Appends the DDL-Script for creating the given table to an SQL-Scriptprotected voiddropDatabase(DBDatabase db, DBSQLScript script) Appends the DDL-Script for dropping a database to the given script objectvoidgetDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script) Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.Methods inherited from class org.apache.empire.db.DBDDLGenerator
addAlterTableStmt, addCreateRelationStmt, alterTable, appendElementName, appendIndexType, createIndex, createRelation, createTableIndexes, createView, dropObject, isDDLColumnDefaults, setDDLColumnDefaults
-
Constructor Details
-
OracleDDLGenerator
-
-
Method Details
-
appendColumnDataType
protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql) Description copied from class:DBDDLGeneratorappends the data type of a column- Overrides:
appendColumnDataTypein classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
type- the typesize- the sizec- the table columnsql- the builder that we will append to- Returns:
- true if further column attributes may be added or false otherwise
-
appendColumnDesc
Description copied from class:DBDDLGeneratorAppends a table column definition to a ddl statement- Overrides:
appendColumnDescin classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
c- the column which description to appendalter- true if altering an existing column or false otherwisesql- the sql builder object
-
appendIndexColumn
Description copied from class:DBDDLGeneratorAppends an column expression to an index- Overrides:
appendIndexColumnin classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
index- the index for which to append the columnidxColumn- the index columnsql- the SQL builder
-
addCreateTableStmt
- Overrides:
addCreateTableStmtin classDBDDLGenerator<DBMSHandlerOracle>
-
addCreateIndexStmt
- Overrides:
addCreateIndexStmtin classDBDDLGenerator<DBMSHandlerOracle>
-
createDatabase
Description copied from class:DBDDLGeneratorAppends the DDL-Script for creating the given database to an SQL-Script
This includes the generation of all tables, views and relations.- Overrides:
createDatabasein classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
db- the database to createscript- the sql script to which to append the dll command(s)
-
dropDatabase
Description copied from class:DBDDLGeneratorAppends the DDL-Script for dropping a database to the given script object- Overrides:
dropDatabasein classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
db- the database to dropscript- the sql script to which to append the dll command(s)
-
getDDLScript
Description copied from class:DBDDLGeneratorAppends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.- Overrides:
getDDLScriptin classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
type- operation to perform (CREATE, DROP, ALTER)dbo- the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)script- the script to which to add the DDL command(s)
-
createSequence
Returns true if the sequence has been created successfully. -
createTable
Description copied from class:DBDDLGeneratorAppends the DDL-Script for creating the given table to an SQL-Script- Overrides:
createTablein classDBDDLGenerator<DBMSHandlerOracle>- Parameters:
t- the table to createscript- the sql script to which to append the dll command(s)
-
addCreateViewStmt
- Overrides:
addCreateViewStmtin classDBDDLGenerator<DBMSHandlerOracle>
-
createComment
protected void createComment(DBDatabase db, String type, DBExpr expr, String comment, DBSQLScript script)
-