public interface DBObjectProvider
DBObjectProvider
interface provides clients with access to database objects. Depending on the implementation, these objects may be defined in an existing database or locally.
The services provided by DBObjectProvider
include:
A DBObjectProvider
can be retrieved through the DBObjectProviderFactory
if the identifier is known for that provider. For more information see @link{DBObjectProviderFactory}.
The api provides a listener mechanism for a DBObjectProvider
so that if objects are added, removed or updated through the DBObjectProvider
a registered DBObjectProviderListener
will be notified of those events.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATE_PRIVILEDGE
Permission to create an object.
|
static java.lang.String |
DELETE_PRIVILEDGE
Permission to delete an object.
|
static java.lang.String |
MODIFY_PRIVILEDGE
Permission to modify an object.
|
static java.lang.String |
NEW_FROM_TEMPLATE_TYPE
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addObjectListener(DBObjectListener list, DBObjectCriteria crit)
Adds a listener that is notified of any updates to objects that match the given criteria.
|
void |
addObjectListener(DBObjectListener list, DBObjectID obj)
Adds a listener that is notified of any updates to the object represented by the given DBObjectID.
|
void |
addObjectListener(DBObjectListener list, SystemObject obj)
Adds a listener that is notified of any updates to the given object.
|
void |
addProviderListener(DBObjectProviderListener list)
Adds the given listener to the list of registered listener for events on this provider.
|
void |
addProviderListener(DBObjectProviderListener list)
Deprecated.
|
boolean |
canCreate(SystemObject object, boolean replace)
Whether an attempt to create the specified object is likely to succeed.
|
boolean |
canDelete(SystemObject object, boolean cascade)
Checks to see whether a specific object can be deleted.
|
void |
canUpdate(Difference listDiff, boolean replace, boolean cascade)
Tests whether the given update can be performed.
|
void |
commitTransaction(DBObjectTransaction txn)
Commits a transaction of object changes.
|
void |
createObject(SystemObject object, boolean replace)
Causes the creation of the object described by the specified meta data.
|
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 |
deleteObject(SystemObject object, boolean cascade)
Deletes the object.
|
void |
deleteObjects(SystemObject[] objects, boolean cascade)
Deletes the objects.
|
void |
deleteSchema(Schema schema, boolean cascade)
Deletes the schema.
|
CascadeManager |
getCascadeManager()
Gets the object for this provider that manages references between objects and how to cascade deletes between them.
|
DataType |
getDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name.
|
DDLGenerator |
getDDLGenerator()
Gets the DDLGenerator for this DBObjectProvider.
|
Schema |
getDefaultSchema()
Returns the default schema for the provider.
|
DBObject |
getDefaultTemplateForType(java.lang.String type)
Returns the default template object for the given type, or null if none defined
|
java.lang.String |
getDescription()
Gets a short description of the provider.
|
DatabaseDescriptor |
getDescriptor()
Returns the DatabaseDescriptor for this provider
|
DiffEngine |
getDiffEngine()
Returns a diff engine setup with the appropriate set of differs for object updating.
|
java.lang.String |
getExternalName(java.lang.String name)
Converts the specified name into the format used externally to represent the identifier.
|
java.lang.String |
getExternalName(java.lang.String name, java.lang.String objectType)
Converts the specified name into the format used externally to represent the identifier.
|
java.lang.String |
getIdentifierQuoteString()
Retrieves the string used to quote identifiers.
|
java.lang.String |
getInternalName(java.lang.String name)
Converts the specified name into the format used internally within the metadata.
|
java.lang.String |
getInternalName(java.lang.String name, java.lang.String objectType)
Converts the specified name into the format used internally within the metadata.
|
java.lang.String |
getName()
The name of a provider is a displayable string that can be shown to the user to identify the provider.
|
<T extends SystemObject> |
getObject(DBObjectCriteria<T> criteria)
Retrieves the SystemObject representing a specific database object.
|
SchemaObject |
getObject(java.lang.String objectType, Schema schema, java.lang.String name)
Retrieves the SchemaObject representing a specific database object.
|
DBObjectFactory |
getObjectFactory()
Get the object factory for this provider.
|
SchemaObjectManager |
getObjectManager()
Deprecated.
|
DataType |
getOrCreateDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name.
|
PropertyManager |
getPropertyManager()
Gets the PropertyManager (if available) for this provider.
|
java.lang.Object |
getProviderIdentifier()
Gets the String that identifies this DBObjectProvider uniquely (within providers of the same type).
|
java.lang.String |
getProviderType()
Gets the String that identifies the type of DBObjectProvider this is an instance of.
|
Schema |
getSchema(java.lang.String name)
Retrieves the Schema object associated with a specific name.
|
java.lang.Long |
getTimestamp(DBObjectID id)
Retrieves the timestamp for the object represented by the given ID.
|
java.lang.Long |
getTimestamp(java.lang.String objectType, Schema schema, java.lang.String name)
Retrieves the timestamp representing the last modification time of the specified object's metadata.
|
java.lang.String |
getUniqueName(java.lang.String type, DBObject contextObject, java.lang.String base)
Retrieves a unique name for an object of a specific type.
|
boolean |
hasObjectPrivilege(SystemObject object, java.lang.String priv)
Checks to see whether the user has the requisite permissions to perform the specified operation on the given object.
|
boolean |
hasPriviledge(java.lang.String type, Schema schema, java.lang.String priv)
|
boolean |
hasSystemPrivilege(java.lang.String type, Schema schema, java.lang.String priv)
Checks to see whether the user has the requisite permissions to perform the specified operation.
|
boolean |
isEditable(DBObject object)
Returns whether or not the object can be edited
|
boolean |
isNewFromTemplateType(java.lang.String type)
Test whether the given type is the pseudo type used for new objects that are being created from a template.
|
boolean |
isValidName(java.lang.String name)
Deprecated.
- use
isValidName( String type, String name ) |
boolean |
isValidName(java.lang.String type, java.lang.String name)
Checks to see whether a name is valid.
|
<T extends SystemObject> |
listObjects(DBObjectCriteria<T> filter)
Lists the objects from this provider that match the given criteria.
|
SchemaObject[] |
listObjects(java.lang.String[] objectTypes, Schema schema)
Lists the objects of multiple types available from this provider.
|
SchemaObject[] |
listObjects(java.lang.String[] objectTypes, Schema schema, java.lang.String ref)
Lists the objects of multiple types available from this provider.
|
java.lang.String[] |
listObjects(java.lang.String objectType, Schema schema)
Lists the objects of a given type available from this provider.
|
java.lang.String[] |
listObjects(java.lang.String objectType, Schema schema, java.lang.String ref)
Lists the objects of a given type available from this provider.
|
java.lang.String[] |
listObjectTypes()
Lists the database object types that can be retrieved from this DBObjectProvider.
|
Schema[] |
listSchemas()
Retrieves the list of schemas available from this provider regardless of their visibility to the user.
|
Schema[] |
listSchemas(boolean showAll)
Retrieves the list of schemas available from this provider.
|
DataType[] |
listSupportedDataTypes()
Retrieves the list of datatypes supported by this provider.
|
java.lang.String |
quoteIdentifier(java.lang.String name, boolean force)
Quotes the specified identifier name, if needed.
|
void |
removeObjectListener(DBObjectListener list)
Removes the given object listener that had been added using
addObjectListener(DBObjectListener,SystemObject) or addObjectListener(DBObjectListener,DBObjectCriteria) . |
void |
removeProviderListener(DBObjectProviderListener list)
Removes the given listener from the list of registered listener for events on this provider.
|
void |
removeProviderListener(DBObjectProviderListener list)
Deprecated.
|
void |
setDefaultTemplateForType(java.lang.String type, DBObject template)
Sets the default template object for the given type.
|
boolean |
supportsObjectType(java.lang.String type)
Convinience method to check whether this provider supports the given object type - i.e.
|
boolean |
supportsTimestamps(java.lang.String objectType)
Tests if this provider supports object timestamping for the given object type.
|
void |
undeleteObject(SchemaObject object)
Undeletes the object, i.e.
|
void |
undeleteObjects(SchemaObject[] objects)
Undeletes the objects, i.e.
|
void |
updateObject(SystemObject oldObject, SystemObject newObject)
Updates the definition of an object.
|
void |
updateObjects(Difference listDiff, boolean replace, boolean cascade)
Updates the definition of a set of objects.
|
void |
updateObjects(SystemObject[] oldObjects, SystemObject[] newObjects)
Updates the definition of a set of objects.
|
void |
updateSchema(Schema oldSchema, Schema newSchema)
Updates the definition of a Schema.
|
void |
validateName(java.lang.String name)
Deprecated.
- use
validateName( String type, String name ) |
void |
validateName(java.lang.String type, java.lang.String name)
Checks to see whether a name is valid for a given type of object.
|
void |
validateObject(DBObject object)
Checks to see if the object is valid.
|
void |
validateObject(DBObject original, DBObject updated)
Checks to see if the object update is valid.
|
void |
validateObject(DBObject original, DBObject updated, java.lang.String property)
Deprecated.
use validateObjectProperty(DBObject,DBObject,Object)
|
void |
validateObject(DBObject object, java.lang.String property)
Deprecated.
use validateObjectProperty(DBObject,Object)
|
void |
validateObjectProperty(DBObject original, DBObject updated, java.lang.Object property)
Deprecated.
|
void |
validateObjectProperty(DBObject original, DBObject updated, java.lang.String property)
Checks to see if the updated children of a given object are valid.
|
void |
validateObjectProperty(DBObject object, java.lang.Object property)
Deprecated.
|
void |
validateObjectProperty(DBObject object, java.lang.String property)
Checks to see if the children of a given object are valid.
|
void |
validateSchema(Schema schema)
Deprecated.
use validateObject(DBObject object)
|
void |
validateSchema(Schema original, Schema updated)
Deprecated.
use validateObject(DBObject original, DBObject updated)
|
void |
validateUniqueName(DBObject object, DBObject contextObject)
Validates that a name is not used within a context DBObject, and throws NameInUseException if it is.
|
void |
validateUniqueName(java.lang.String type, DBObject contextObject, java.lang.String name)
Validates that a name is not used within a context DBObject, and throws NameInUseException if it is.
|
static final java.lang.String CREATE_PRIVILEDGE
static final java.lang.String DELETE_PRIVILEDGE
static final java.lang.String MODIFY_PRIVILEDGE
@Deprecated static final java.lang.String NEW_FROM_TEMPLATE_TYPE
java.lang.String getProviderType()
java.lang.Object getProviderIdentifier()
getName()
for a displayable String).java.lang.String getName()
getProviderIdentifier()
.getProviderIdentifier()
java.lang.String getDescription()
DBObjectProviderFactory.getDescription(String,Object)
void addProviderListener(DBObjectProviderListener list)
DBObjectProviderListener
@Deprecated void addProviderListener(DBObjectProviderListener list)
addProviderListener(DBObjectProviderListener)
void removeProviderListener(DBObjectProviderListener list)
DBObjectProviderListener
@Deprecated void removeProviderListener(DBObjectProviderListener list)
removeProviderListener(DBObjectProviderListener)
void addObjectListener(DBObjectListener list, DBObjectCriteria crit)
list
- the listener to registercrit
- a criteria object to use to match objects that update messages are published foraddObjectListener(DBObjectListener,SystemObject)
, addObjectListener(DBObjectListener,DBObjectID)
void addObjectListener(DBObjectListener list, SystemObject obj)
This mechanism differs from SystemObject.addObjectListener(DBObjectListener)
because that listens to a specific object instance. Registering the listener with the provider through this method ensures that events will be received for the lifetime of the provider (as the particular object instance could be lost - e.g. gc'd).
list
- the listener to registerobj
- the object to receive update events foraddObjectListener(DBObjectListener,DBObjectCriteria)
, addObjectListener(DBObjectListener,DBObjectID)
void addObjectListener(DBObjectListener list, DBObjectID obj)
This mechanism differs from SystemObject.addObjectListener(DBObjectListener)
because that listens to a specific object instance. Registering the listener with the provider through this method ensures that events will be received for the lifetime of the provider (as the particular object instance could be lost - e.g. gc'd).
list
- the listener to registerid
- of obj the object to receive update events foraddObjectListener(DBObjectListener,DBObjectCriteria)
, addObjectListener(DBObjectListener,SystemObject)
void removeObjectListener(DBObjectListener list)
addObjectListener(DBObjectListener,SystemObject)
or addObjectListener(DBObjectListener,DBObjectCriteria)
.list
- the registered listener to removeboolean canCreate(SystemObject object, boolean replace)
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.void createObject(SystemObject object, boolean replace) throws DBException
object
- the SystemObject describing the object to create.replace
- whether to replace an existing object. If replace
is false and the object exists, createObject will fail.DBException
- if an error is encountered creating the object.void createObjects(SystemObject[] objects, boolean replace) throws DBException
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.boolean canDelete(SystemObject object, boolean cascade)
object
- the object to checkcascade
- whether to assume a cascading delete should be used.void deleteObject(SystemObject object, boolean cascade) throws DBException
object
- the object to deletecascade
- whether to delete dependent objectsDBException
- if an error is encountered performing the deletevoid deleteObjects(SystemObject[] objects, boolean cascade) throws DBException
objects
- the objects to deletecascade
- whether to delete dependent objectsDBException
- if an error is encountered performing the deletevoid undeleteObject(SchemaObject object) throws DBException
object
- the object to be undeletedDBException
- if an error is encountered performing the undeletevoid undeleteObjects(SchemaObject[] objects) throws DBException
objects
- the objects to be undeletedDBException
- if an error is encountered performing the undelete@Deprecated boolean hasPriviledge(java.lang.String type, Schema schema, java.lang.String priv)
boolean hasSystemPrivilege(java.lang.String type, Schema schema, java.lang.String priv)
type
- the object type on which the operation is being performed.schema
- the schema to check. A value of null
checks for the current schema.priv
- a pre-defined operation.boolean hasObjectPrivilege(SystemObject object, java.lang.String priv)
object
- the object on which the operation is being performed.priv
- a pre-defined operation.java.lang.String getUniqueName(java.lang.String type, DBObject contextObject, java.lang.String base)
type
- is the type of object to get the name forcontextObject
- is the database object context to use when determining the uniqueness of the namebase
- is the base name to use. If base is null or zero length, the type name suffixed with 1 is used.void validateUniqueName(java.lang.String type, DBObject contextObject, java.lang.String name) throws NameInUseException
type
- the type of name being validatedcontextObject
- the database object context to use when determining the uniqueness of the name (can be a parent, or a Schema, or null).name
- the name to be checkedNameInUseException
- if the name is in use.void validateUniqueName(DBObject object, DBObject contextObject) throws NameInUseException
object
- the object whose name is to be validated as uniquecontextObject
- the database object context to use when determining the uniqueness of the name (can be a parent, or a Schema, or null).NameInUseException
- if the name is in use.@Deprecated boolean isValidName(java.lang.String name)
isValidName( String type, String name )
name
- the name to checkisValidName(java.lang.String, java.lang.String)
boolean isValidName(java.lang.String type, java.lang.String name)
name
- the name to checktype
- the type of object the name is intended for@Deprecated void validateName(java.lang.String name) throws InvalidNameException
validateName( String type, String name )
name
- the name to checkInvalidNameException
- with appropriate message if the name is invalid.validateName(java.lang.String, java.lang.String)
void validateName(java.lang.String type, java.lang.String name) throws InvalidNameException
name
- the name to checktype
- the type of object that the name is intended for (e.g. Table.TYPE
)InvalidNameException
- with appropriate message if the name is invalid.java.lang.String quoteIdentifier(java.lang.String name, boolean force) throws DBException
name
- the name to quoteforce
- whether to quote even if the identifier is valid already.DBException
- if the name when quoted is still invalidjava.lang.String getInternalName(java.lang.String name)
name
- a String containing the name to convertjava.lang.String getInternalName(java.lang.String name, java.lang.String objectType)
name
- a String containing the name to convertobjectType
- a String containing the type of object being namedgetExternalName(String,String)
java.lang.String getExternalName(java.lang.String name)
quoteIdentifier
, specifying false
for the force argument. Note, however, that exceptions are not thrown; rather, the original name will be returned.name
- a String containing the name to externalizejava.lang.String getExternalName(java.lang.String name, java.lang.String objectType)
quoteIdentifier
, specifying false
for the force argument. Note, however, that exceptions are not thrown; rather, the original name will be returned.name
- a String containing the name to externalizeobjectType
- a String containing the type of object being namedgetInternalName(String,String)
java.lang.String getIdentifierQuoteString()
null
.DatabaseDescriptor getDescriptor()
void validateObject(DBObject object) throws ValidationException
object
- The object to validateValidationException
- if the object is not valid. The exception will describe the validation failure. A MissingValidatorException is thrown if the provider has no validator for the given object type.@Deprecated void validateObject(DBObject object, java.lang.String property) throws ValidationException
ValidationException
void validateObjectProperty(DBObject object, java.lang.String property) throws ValidationException
validateObject(DBObject)
is called.object
- The object to validateproperty
- An identifier for a specific property to validateValidationException
- if the object is not valid. The exception will describe the validation failure. A MissingValidatorException is thrown if the provider has no validator for the given object type, or property.@Deprecated void validateObjectProperty(DBObject object, java.lang.Object property) throws ValidationException
validateObjectProperty(DBObject,String)
ValidationException
void validateObject(DBObject original, DBObject updated) throws ValidationException
object
- The original objectobject
- The updated object to validateValidationException
- if the updated object is not valid. The exception will describe the validation failure. A MissingValidatorException
is thrown if the provider has no validator for the given object type.@Deprecated void validateObject(DBObject original, DBObject updated, java.lang.String property) throws ValidationException
ValidationException
void validateObjectProperty(DBObject original, DBObject updated, java.lang.String property) throws ValidationException
validateObject(DBObject,DBObject)
is called.original
- The original version of the edited objectupdated
- The edited object to validateproperty
- An identifier for a specific property to validateValidationException
- if the object is not valid. The exception will describe the validation failure. A MissingValidatorException
is thrown if the provider has no validator for the given object type, or property.@Deprecated void validateObjectProperty(DBObject original, DBObject updated, java.lang.Object property) throws ValidationException
validateObjectProperty(DBObject,DBObject,String)
ValidationException
@Deprecated void validateSchema(Schema schema) throws ValidationException
schema
- The Schema to validateValidationException
- if the Schema is not valid. The exception will describe the validation failure.@Deprecated void validateSchema(Schema original, Schema updated) throws ValidationException
object
- The original schemaobject
- The updated schema to validateValidationException
- if the updated schema is not valid. The exception will describe the validation failure.<T extends SystemObject> T getObject(DBObjectCriteria<T> criteria) throws DBException
Examples:
// find EMP in a given provider and schema DBObjectProvider pro = ... Schema schema = ... SystemObject obj = pro.getObject( DBObjectCriteria.createCriteria( Table.TYPE, schema, "EMP" ) ); // find Table HR.EMPLOYEES DBObjectCriteriac = new DBObjectCriteria(Table.class); c.setNameLike( "EMPLOYEES" ); c.setSchemaName( "HR" ); Table employees = pro.getObject( c );
the
- criteria to match the object requiredDBException
- if an error is encountered retrieving the objectSchemaObject getObject(java.lang.String objectType, Schema schema, java.lang.String name) throws DBException
getObject(DBObjectCriteria)
.objectType
- the type of object desired.schema
- the name of the schema containing the objectname
- the name of the objectDBException
- if an error is encountered retrieving the objectDBObject.getType()
@Deprecated SchemaObjectManager getObjectManager()
getCascadeManager()
CascadeManager getCascadeManager()
DBObjectFactory getObjectFactory()
void canUpdate(Difference listDiff, boolean replace, boolean cascade) throws DBException
canCreate
and canDelete
methods which return a simple boolean so the reason cannot be determined.listDiff
- a LIST Difference containing new and old schema objectsreplace
- whether existing objects can be replacedcascade
- whether to cascade any changes. If this is false and there are dependent objects a CascadeRequiredException will be thrown.DBException
updateObjects(Difference,boolean,boolean)
void updateObjects(Difference listDiff, boolean replace, boolean cascade) throws DBException
Difference
which must have been created using the DiffEngine
returned by getDiffEngine()
The 'change' maybe to create, alter, or delete objects.
Example usage to rename a simple table and cascade the change:
final Table orig = provider.getObject( Table.TYPE, schema, "OLD_NAME" ); // create a temporary copy that can be used to update final Table update = (Table)orig.copyTo( null, true ); update.setName( "NEW_NAME" ); // create a LIST Difference containing the new and old objects final Difference diff = provider.getDiffEngine().difference( new SystemObject[]{ orig }, new SystemObject[]{ update } ); provider.updateObjects( diff , false, true );
listDiff
- 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 existing objects can be replaced (used when creating - i.e. the "old" update in the Difference is null)cascade
- true if changes can be cascaded throughout the provider (e.g. deletes cascaded, renames propogated etc). If this is false and the operation cannot continue without cascading a CascadeRequiredException will be thrown. Some DBObjectProvider implementations will automatically cascade some changes - for example an Oracle Database will propogate a Table rename to its Triggers.DBException
void updateObject(SystemObject oldObject, SystemObject newObject) throws DBException
oldObject
- the old version of the objectnewObject
- the new version of the objectDBException
- if the update failsupdateObjects(Difference,boolean,boolean)
void updateObjects(SystemObject[] oldObjects, SystemObject[] newObjects) throws DBException
oldObject
- the old version of the objectsnewObject
- the new version of the objectsDBException
- if the update failsupdateObjects(Difference,boolean,boolean)
void commitTransaction(DBObjectTransaction txn) throws DBException
txn
- the transaction to commitDBException
- if the operation fails.<T extends SystemObject> java.util.Collection<T> listObjects(DBObjectCriteria<T> filter) throws DBException
Examples:
// list Tables beginning with E in a given schema DBObjectProvider pro = ... Schema schema = ... SystemObject obj = pro.listObjects( DBObjectCriteria.createCriteria( Table.TYPE, schema, "E%" ) ); // list all objects that have columns and constraints in schema HR DBObjectCriteria<Relation> c = new DBObjectCriteria<Relation>(Relation.class); c.setSchemaName( "HR" ); Collection<Relation> rels = pro.listObjects( c ); // list all the schemas in this provider Collection<Schema> schemas = pro.listObjects( new DBObjectCriteria<Schema>(Schema.class) );
filter
- the filter to use for listing objects (cannot be null)DBException
- if an error is encountered listing the objectsjava.lang.String[] listObjects(java.lang.String objectType, Schema schema) throws DBException
objectType
- the type of objects to listschema
- the schema to list fromDBException
java.lang.String[] listObjects(java.lang.String objectType, Schema schema, java.lang.String ref) throws DBException
objectType
- the type of objects to listschema
- the schema to list fromref
- a pattern to match against.DBException
SchemaObject[] listObjects(java.lang.String[] objectTypes, Schema schema) throws DBException
objectTypes
- an array of Strings representing the desired typesschema
- the Schema to list fromDBException
- if an error is encountered listing the objectsSchemaObject[] listObjects(java.lang.String[] objectTypes, Schema schema, java.lang.String ref) throws DBException
objectTypes
- an array of Strings representing the desired typesschema
- the Schema to list fromref
- a pattern to match against.DBException
- if an error is encountered listing the objectsjava.lang.Long getTimestamp(java.lang.String objectType, Schema schema, java.lang.String name) throws DBException
null
value should be returned.objectType
- a String containing the type of the objectschema
- the Schema containing the objectname
- a String containing the name of the objectDBException
- if an error is encountered getting the timestampjava.lang.Long getTimestamp(DBObjectID id) throws DBException
id
- the ID for the objectDBException
- if an error is encountered getting the timestampgetTimestamp(String,Schema,String)
java.lang.String[] listObjectTypes()
listObjects(oracle.javatools.db.DBObjectCriteria<T>)
boolean supportsObjectType(java.lang.String type)
listObjectTypes()
DataType[] listSupportedDataTypes()
DataType
objects representing the supported datatypes.DataType getDataType(java.lang.String typeName)
typeName
- a String containing the name of the datatype.DataType getOrCreateDataType(java.lang.String typeName)
typeName
- a String containing the name of the datatype.UserDataType
and registers this with the provider.Schema[] listSchemas() throws DBException
DBException
listSchemas(boolean)
Schema[] listSchemas(boolean showAll) throws DBException
showAll
- if false, only schemas containing objects belonging to (or visible to) the user are returnedDBException
- if an error is encountered listing the schemas.Schema getSchema(java.lang.String name) throws DBException
name
- a string containing the name of the schemaDBException
- if an error is encountered getting the schemaSchema getDefaultSchema() throws DBException
DBException
void createSchema(Schema schema, boolean replace) throws DBException
schema
- the schema being createdreplace
- whether to replace an existing schemaDBException
- if an error is encountered creating the schemavoid updateSchema(Schema oldSchema, Schema newSchema) throws DBException
oldSchema
- the old version of the schemanewSchema
- the new version of the schemaDBException
- if the update failsvoid deleteSchema(Schema schema, boolean cascade) throws DBException
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 deleteDiffEngine getDiffEngine()
Providers which do not support object updating should return null.
PropertyManager getPropertyManager()
DDLGenerator getDDLGenerator()
boolean isEditable(DBObject object)
DBObject getDefaultTemplateForType(java.lang.String type)
void setDefaultTemplateForType(java.lang.String type, DBObject template)
boolean isNewFromTemplateType(java.lang.String type)
type
- the type to testboolean supportsTimestamps(java.lang.String objectType)
If this returns false then updates to an object not made through the DBObjectProvider will not be picked up by an existing object definition.