|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.db.AbstractDBObjectProvider oracle.javatools.db.AbstractDatabase oracle.javatools.db.ddl.DDLDatabase
public abstract class DDLDatabase
Database implementation that uses a DDLGenerator to create, update and delete objects.
Field Summary |
---|
Fields inherited from class oracle.javatools.db.AbstractDatabase |
---|
SQLSTATE_NOT_IMPLEMENTED |
Fields inherited from class oracle.javatools.db.AbstractDBObjectProvider |
---|
CASE_SENSITIVE_NAME_POLICY, EMPTY_LIST, LOWER_CASE_NAME_POLICY, MIXED_CASE_NAME_POLICY, NEW_FROM_TEMPLATE_TYPE, TIMESTAMP_PROPERTY, UPPER_CASE_NAME_POLICY |
Fields inherited from interface oracle.javatools.db.Database |
---|
FOUR_GIG, GENERIC_JDBC_DATABASE, SOURCE_TYPE_BODY, SOURCE_TYPE_SPEC, TWO_GIG |
Fields inherited from interface oracle.javatools.db.DBObjectProvider |
---|
CREATE_PRIVILEDGE, DELETE_PRIVILEDGE, MODIFY_PRIVILEDGE, NEW_FROM_TEMPLATE_TYPE |
Constructor Summary | |
---|---|
protected |
DDLDatabase(java.lang.String connStore,
java.lang.String connName,
java.sql.Connection conn)
|
Method Summary | |
---|---|
boolean |
canCreate(SystemObject object,
boolean replace)
Whether an attempt to create the specified object is likely to succeed. |
boolean |
canDelete(SystemObject obj,
boolean cascade)
Checks to see whether a specific object can be deleted. |
void |
createObjects(SystemObject[] objects,
boolean replace)
Causes the creation of the objects described by the specified meta data. |
void |
createSchema(Schema schema,
boolean replace)
Causes the creation of a new Schema in the persistent storage. |
void |
deleteObjects(SystemObject[] objects,
boolean cascade)
Deletes the objects. |
void |
deleteSchema(Schema schema,
boolean cascade)
Deletes the schema. |
protected boolean |
executeDDL(DDL ddl,
boolean ignoreErrors)
|
DDLGenerator |
getDDLGenerator()
Gets the DDLGenerator for this DDLDatabase implementation. |
DiffEngine |
getDiffEngine()
Returns a diff engine setup with the appropriate set of differs for object updating. |
protected boolean |
isCauseNameInUse(DBException dbe)
Used by processCreateException to determine whether the given failure in DDL execution should be rolled back (i.e. |
protected java.util.Collection<SystemObject> |
listObjectsImpl(java.lang.String[] objectTypes,
Schema schema,
java.lang.String ref)
Internal listObjects implementation. |
Schema[] |
listSchemas()
Retrieves the list of schemas available from this provider regardless of their visibility to the user. |
protected void |
processCreateException(DBException dbe,
SystemObject object)
|
protected void |
processDeleteException(DBException dbe,
SystemObject object)
When an exception is encountered during delete of an object it may be for legitimate reasons that we want to ignore (e.g. |
protected void |
registerExpanders()
|
void |
setCompilerOptions()
|
void |
undeleteObject(SchemaObject object)
Undeletes the object, i.e. |
void |
undeleteObjects(SchemaObject[] objects)
Undeletes the objects, i.e. |
void |
updateObjects(Difference rs,
boolean replace,
boolean cascade)
Updates the definition of a set of objects. |
void |
updateSchema(Schema oldSchema,
Schema newSchema)
Updates the definition of a Schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.javatools.db.Database |
---|
getIdentifierQuoteString, getUserName |
Constructor Detail |
---|
protected DDLDatabase(java.lang.String connStore, java.lang.String connName, java.sql.Connection conn)
Method Detail |
---|
public DDLGenerator getDDLGenerator()
DatabaseDescriptor.getDDLGenerator(oracle.javatools.db.DBObjectProvider)
.
getDDLGenerator
in class AbstractDatabase
protected final java.util.Collection<SystemObject> listObjectsImpl(java.lang.String[] objectTypes, Schema schema, java.lang.String ref) throws DBException
AbstractDBObjectProvider
AbstractDBObjectProvider.listObjectsImpl(DBObjectCriteria)
and shouldn't be overridden.
listObjectsImpl
in class AbstractDBObjectProvider
DBException
public DiffEngine getDiffEngine()
DBObjectProvider
Providers which do not support object updating should return null.
getDiffEngine
in interface DBObjectProvider
getDiffEngine
in class AbstractDBObjectProvider
protected final boolean executeDDL(DDL ddl, boolean ignoreErrors) throws DBException
DBException
public final boolean canCreate(SystemObject object, boolean replace)
DBObjectProvider
object
- the SystemObject describing the object to createreplace
- whether to replace an existing object. If
replace
is false and the object exists, canCreate must
return false.
public final boolean canDelete(SystemObject obj, boolean cascade)
DBObjectProvider
obj
- the object to checkcascade
- whether to assume a cascading delete should be used.
public final void createSchema(Schema schema, boolean replace) throws DBException
DBObjectProvider
createSchema
in interface DBObjectProvider
createSchema
in class AbstractDBObjectProvider
schema
- the schema being createdreplace
- whether to replace an existing schema
DBException
- if an error is encountered creating the schemapublic final void deleteSchema(Schema schema, boolean cascade) throws DBException
DBObjectProvider
deleteSchema
in interface DBObjectProvider
deleteSchema
in class AbstractDBObjectProvider
schema
- the schema to deletecascade
- whether to delete dependent objects (i.e. all SchemaObjects
contained in the Schema).
DBException
- if an error is encountered performing the deletepublic final void updateSchema(Schema oldSchema, Schema newSchema) throws DBException
DBObjectProvider
updateSchema
in interface DBObjectProvider
updateSchema
in class AbstractDBObjectProvider
oldSchema
- the old version of the schemanewSchema
- the new version of the schema
DBException
- if the update failspublic final void createObjects(SystemObject[] objects, boolean replace) throws DBException
DBObjectProvider
objects
- the SystemObject[] describing the objects to create.replace
- whether to replace an existing objects. If
replace
is false and the object exists, createObjects will
fail.
DBException
- if an error is encountered creating the objects.protected void processCreateException(DBException dbe, SystemObject object) throws DBException
DBException
protected boolean isCauseNameInUse(DBException dbe)
public void deleteObjects(SystemObject[] objects, boolean cascade) throws DBException
DBObjectProvider
objects
- the objects to deletecascade
- whether to delete dependent objects
DBException
- if an error is encountered performing the deleteprotected void processDeleteException(DBException dbe, SystemObject object) throws DBException
dbe
- the exception to check and re-throw if we don't want to ignore
itobject
- the object we're trying to delete
DBException
- the re-thrown exception assuming we don't want to
ignore itpublic final void undeleteObject(SchemaObject object) throws DBException
DBObjectProvider
object
- the object to be undeleted
DBException
- if an error is encountered performing the undeletepublic final void undeleteObjects(SchemaObject[] objects) throws DBException
DBObjectProvider
objects
- the objects to be undeleted
DBException
- if an error is encountered performing the undeletepublic final void updateObjects(Difference rs, boolean replace, boolean cascade) throws DBException
DBObjectProvider
Difference
which
must have been created using the DiffEngine
returned by
DBObjectProvider.getDiffEngine()
The 'change' maybe to create, alter, or delete
objects.
rs
- the changes described as a Difference
- this should be a
LIST Difference with the old objects as a() and the new objects as b().replace
- true if an existing object is to be replaced (when creating)cascade
- true if cascade delete should be used to replace an object
(when deleting)
DBException
protected void registerExpanders()
registerExpanders
in class AbstractDBObjectProvider
public final Schema[] listSchemas() throws DBException
DBObjectProvider
listSchemas
in interface DBObjectProvider
listSchemas
in class AbstractDBObjectProvider
DBException
DBObjectProvider.listSchemas(boolean)
public void setCompilerOptions()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |