Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.javatools.db
Interface DBObjectProvider

All Known Subinterfaces:
Database, JdbcDatabase, OracleDatabase, OracleDatabaseXE
All Known Implementing Classes:
AbstractDatabase, AbstractDBObjectProvider, DDLDatabase, DictionaryDatabase, OfflineDBObjectProvider

public interface DBObjectProvider

The 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.

See Also:
oracle.javatools.db, DBObjectProviderFactory, Database, DBObjectProviderListener

Field Summary
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
           
 
Method Summary
 void addProviderListener(DBObjectProviderListener list)
          Adds the given listener to the list of registered listener for events on this provider.
 boolean canCreate(Schema schema, boolean replace)
          Whether an attempt to create the specified schema is likely to succeed.
 boolean canCreate(SchemaObject object, boolean replace)
          Whether an attempt to create the specified object is likely to succeed.
 boolean canDelete(Schema schema, boolean cascade)
          Checks to see whether a specific schema can be deleted.
 boolean canDelete(SchemaObject object, boolean cascade)
          Checks to see whether a specific object can be deleted.
 void createObject(SchemaObject object, boolean replace)
          Causes the creation of the object described by the specified meta data.
 void createObjects(SchemaObject[] 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(SchemaObject object, boolean cascade)
          Deletes the object.
 void deleteObjects(SchemaObject[] objects, boolean cascade)
          Deletes the objects.
 void deleteSchema(Schema schema, boolean cascade)
          Deletes the schema.
 DataType getDataType(java.lang.String typeName)
          Retrieves the datatype represented by a specific name.
 Schema getDefaultSchema()
          Returns the default schema for the provider.
 SchemaObject getDefaultTemplateForType(java.lang.String type)
          Returns the default template object for the given type, or null if none defined
 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.
 SchemaObject getObject(java.lang.String objectType, Schema schema, java.lang.String name)
          Retrieves the SchemaObject representing a specific database object.
 SchemaObjectManager getObjectManager()
          DO NOT USE this method until Mark has reviewed its inclusion in the API.
 DataType getOrCreateDataType(java.lang.String typeName)
          Retrieves the datatype represented by a specific name.
 Schema getSchema(java.lang.String name)
          Retrieves the Schema object associated with a specific name.
 java.lang.Long getTimestamp(DBObjectID 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 hasPriviledge(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)
           
 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.
 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 supported by 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 removeProviderListener(DBObjectProviderListener list)
          Removes the given listener from the list of registered listener for events on this provider.
 void setDefaultTemplateForType(java.lang.String type, SchemaObject 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.
 void undeleteObject(SchemaObject object)
          Undeletes the object, i.e.
 void undeleteObjects(SchemaObject[] objects)
          Undeletes the objects, i.e.
 void updateObject(SchemaObject oldObject, SchemaObject newObject)
          Updates the definition of an object.
 void updateObjects(ResultSet rs, boolean replace, boolean cascade)
          Updates the definition of a set of objects.
 void updateObjects(SchemaObject[] oldObjects, SchemaObject[] 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)
          Checks to see if the updated children of a given object are valid.
 void validateObjectProperty(DBObject object, java.lang.Object 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(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.
 

Field Detail

CREATE_PRIVILEDGE

static final java.lang.String CREATE_PRIVILEDGE
Permission to create an object.

See Also:
hasPriviledge(java.lang.String, oracle.javatools.db.Schema, java.lang.String), Constant Field Values

DELETE_PRIVILEDGE

static final java.lang.String DELETE_PRIVILEDGE
Permission to delete an object.

See Also:
hasPriviledge(java.lang.String, oracle.javatools.db.Schema, java.lang.String), Constant Field Values

MODIFY_PRIVILEDGE

static final java.lang.String MODIFY_PRIVILEDGE
Permission to modify an object.

See Also:
hasPriviledge(java.lang.String, oracle.javatools.db.Schema, java.lang.String), Constant Field Values

NEW_FROM_TEMPLATE_TYPE

static final java.lang.String NEW_FROM_TEMPLATE_TYPE
See Also:
Constant Field Values
Method Detail

addProviderListener

void addProviderListener(DBObjectProviderListener list)
Adds the given listener to the list of registered listener for events on this provider.

See Also:
DBObjectProviderListener

removeProviderListener

void removeProviderListener(DBObjectProviderListener list)
Removes the given listener from the list of registered listener for events on this provider.

See Also:
DBObjectProviderListener

canCreate

boolean canCreate(SchemaObject object,
                  boolean replace)
Whether an attempt to create the specified object is likely to succeed.

Parameters:
object - the SchemaObject describing the object to create
replace - whether to replace an existing object. If replace is false and the object exists, canCreate must return false.
Returns:
whether the create will succeed.

createObject

void createObject(SchemaObject object,
                  boolean replace)
                  throws DBException
Causes the creation of the object described by the specified meta data.

Parameters:
object - the SchemaObject describing the object to create.
replace - whether to replace an existing object. If replace is false and the object exists, createObject will fail.
Throws:
DBException - if an error is encountered creating the object.

createObjects

void createObjects(SchemaObject[] objects,
                   boolean replace)
                   throws DBException
Causes the creation of the objects described by the specified meta data.

Parameters:
objects - the SchemaObject[] describing the objects to create.
replace - whether to replace an existing objects. If replace is false and the object exists, createObjects will fail.
Throws:
DBException - if an error is encountered creating the objects.

deleteObject

void deleteObject(SchemaObject object,
                  boolean cascade)
                  throws DBException
Deletes the object.

Parameters:
object - the object to delete
cascade - whether to delete dependent objects
Throws:
DBException - if an error is encountered performing the delete

deleteObjects

void deleteObjects(SchemaObject[] objects,
                   boolean cascade)
                   throws DBException
Deletes the objects.

Parameters:
objects - the objects to delete
cascade - whether to delete dependent objects
Throws:
DBException - if an error is encountered performing the delete

undeleteObject

void undeleteObject(SchemaObject object)
                    throws DBException
Undeletes the object, i.e. removes it from the recycle bin. In Oracle, only tables and indexes can be undeleted.

Parameters:
object - the object to be undeleted
Throws:
DBException - if an error is encountered performing the undelete

undeleteObjects

void undeleteObjects(SchemaObject[] objects)
                     throws DBException
Undeletes the objects, i.e. removes them from the recycle bin. In Oracle, only tables and indexes can be undeleted.

Parameters:
objects - the objects to be undeleted
Throws:
DBException - if an error is encountered performing the undelete

hasPriviledge

boolean hasPriviledge(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. For example, whether the user has permission to create a new table in a specific schema.

Parameters:
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.
Returns:
whether the specified operation can be completed.

getUniqueName

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. If base is unique, it returns base, otherwise, if base is suffixed with a number, it increments the number until it finds a unique name. If base isn't suffixed with a number, it appends 1 and increments the number until it finds a unique name.

Parameters:
type - is the type of object to get the name for
contextObject - is the database object context to use when determining the uniqueness of the name
base - is the base name to use. If base is null or zero length, the type name suffixed with 1 is used.
Returns:
a unique name for the given object type.

validateUniqueName

void validateUniqueName(java.lang.String type,
                        DBObject contextObject,
                        java.lang.String name)
                        throws NameInUseException
Validates that a name is not used within a context DBObject, and throws NameInUseException if it is. The NameInUseException should contain the name, and the DBObject containing the name.

Parameters:
type - : the type of name being validated
contextObject - : the database object context to use when determining the uniqueness of the name
name - : the name to be checked
Throws:
NameInUseException

isValidName

@Deprecated
boolean isValidName(java.lang.String name)
Deprecated. - use isValidName( String type, String name )

Checks to see whether a name is valid. Note that a valid name does not guarantee uniqueness.

Parameters:
name - the name to check
Returns:
whether the name is valid
See Also:
isValidName(java.lang.String, java.lang.String)

isValidName

boolean isValidName(java.lang.String type,
                    java.lang.String name)
Checks to see whether a name is valid. Note that a valid name does not guarantee uniqueness.

Parameters:
name - the name to check
type - the type of object the name is intended for
Returns:
whether the name is valid
Since:
11.0

validateName

@Deprecated
void validateName(java.lang.String name)
                  throws InvalidNameException
Deprecated. - use validateName( String type, String name )

Checks to see whether a name is valid. Note that a valid name does not guarantee uniqueness.

Parameters:
name - the name to check
Throws:
InvalidNameException - with appropriate message if the name is invalid.
See Also:
validateName(java.lang.String, java.lang.String)

validateName

void validateName(java.lang.String type,
                  java.lang.String name)
                  throws InvalidNameException
Checks to see whether a name is valid for a given type of object. Note that a valid name does not guarantee uniqueness.

Parameters:
name - the name to check
type - the type of object that the name is intended for (e.g. Table.TYPE )
Throws:
InvalidNameException - with appropriate message if the name is invalid.
Since:
11.0

quoteIdentifier

java.lang.String quoteIdentifier(java.lang.String name,
                                 boolean force)
                                 throws DBException
Quotes the specified identifier name, if needed.

Parameters:
name - the name to quote
force - whether to quote even if the identifier is valid already.
Returns:
the quoted name
Throws:
DBException - if the name when quoted is still invalid

getInternalName

java.lang.String getInternalName(java.lang.String name)
Converts the specified name into the format used internally within the metadata. Generally, internal names are not quoted; quoted names have the quotes removed. Unquoted names may be converted to a single case if the underlying provider does not support mixed case identifiers.

Parameters:
name - a String containing the name to convert
Returns:
the internal version of the name

getInternalName

java.lang.String getInternalName(java.lang.String name,
                                 java.lang.String objectType)
Converts the specified name into the format used internally within the metadata. Generally, internal names are not quoted; quoted names have the quotes removed. Unquoted names may be converted to a single case if the underlying provider does not support mixed case identifiers.

Parameters:
name - a String containing the name to convert
objectType - a String containing the type of object being named
Returns:
the internal version of the name

getExternalName

java.lang.String getExternalName(java.lang.String name)
Converts the specified name into the format used externally to represent the identifier. In most case, this is equivalent to calling quoteIdentifier, specifying false for the force argument. Note, however, that exceptions are not thrown; rather, the original name will be returned.

Parameters:
name - a String containing the name to externalize
Returns:
a String containing the externalized name

getExternalName

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. In most case, this is equivalent to calling quoteIdentifier, specifying false for the force argument. Note, however, that exceptions are not thrown; rather, the original name will be returned.

Parameters:
name - a String containing the name to externalize
objectType - a String containing the type of object being named
Returns:
a String containing the externalized name

getIdentifierQuoteString

java.lang.String getIdentifierQuoteString()
Retrieves the string used to quote identifiers. By default, the quote string is assumed to be ". If the quoting of identifiers is not supported by a subclass, that subclass should return null.

Returns:
the string containing the character or characters used to quote an identifier.

getDescriptor

DatabaseDescriptor getDescriptor()
Returns the DatabaseDescriptor for this provider


canDelete

boolean canDelete(SchemaObject object,
                  boolean cascade)
Checks to see whether a specific object can be deleted.

Parameters:
object - the object to check
cascade - whether to assume a cascading delete should be used.
Returns:
whether the delete, if attempted, would succeed.

validateObject

void validateObject(DBObject object)
                    throws ValidationException
Checks to see if the object is valid. If the object is a child object (e.g. a Column) this will not validate its place in the parent, only the individual DBObject definition.

Parameters:
object - The object to validate
Throws:
ValidationException - 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.

validateObject

@Deprecated
void validateObject(DBObject object,
                               java.lang.String property)
                    throws ValidationException
Deprecated. use validateObjectProperty(DBObject,Object)

Throws:
ValidationException

validateObjectProperty

void validateObjectProperty(DBObject object,
                            java.lang.Object property)
                            throws ValidationException
Checks to see if the children of a given object are valid. If the object has no children of the given type a MissingValidatorException will be thrown. This is a convinience method to perform validation to a specific property on an object - all properties will be validated if validateObject(DBObject) is called.

Parameters:
object - The object to validate
property - An identifier for a specific property to validate
Throws:
ValidationException - 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.

validateObject

void validateObject(DBObject original,
                    DBObject updated)
                    throws ValidationException
Checks to see if the object update is valid.

Parameters:
object - The original object
object - The updated object to validate
Throws:
ValidationException - 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.

validateObject

@Deprecated
void validateObject(DBObject original,
                               DBObject updated,
                               java.lang.String property)
                    throws ValidationException
Deprecated. use validateObjectProperty(DBObject,DBObject,Object)

Throws:
ValidationException

validateObjectProperty

void validateObjectProperty(DBObject original,
                            DBObject updated,
                            java.lang.Object property)
                            throws ValidationException
Checks to see if the updated children of a given object are valid. If the object has no children of the given type a MissingValidatorException will be thrown. This is a convinience method to perform validation to a specific property on an object - all properties will be validated if validateObject(DBObject,DBObject) is called.

Parameters:
original - The original version of the edited object
updated - The edited object to validate
property - An identifier for a specific property to validate
Throws:
ValidationException - 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.

validateSchema

@Deprecated
void validateSchema(Schema schema)
                    throws ValidationException
Deprecated. use validateObject(DBObject object)

Checks to see if the Schema is valid.

Parameters:
schema - The Schema to validate
Throws:
ValidationException - if the Schema is not valid. The exception will describe the validation failure.

validateSchema

@Deprecated
void validateSchema(Schema original,
                               Schema updated)
                    throws ValidationException
Deprecated. use validateObject(DBObject original, DBObject updated)

Checks to see if the schema update is valid.

Parameters:
object - The original schema
object - The updated schema to validate
Throws:
ValidationException - if the updated schema is not valid. The exception will describe the validation failure.

getObject

SchemaObject getObject(java.lang.String objectType,
                       Schema schema,
                       java.lang.String name)
                       throws DBException
Retrieves the SchemaObject representing a specific database object.

Parameters:
objectType - the type of object desired.
schema - the name of the schema containing the object
name - the name of the object
Returns:
the SchemaObject matching the specified criteria
Throws:
DBException - if an error is encountered retrieving the object
See Also:
DBObject.getType()

getObjectManager

SchemaObjectManager getObjectManager()
DO NOT USE this method until Mark has reviewed its inclusion in the API. Retrieves the object manager for dealing with dependencies in this provider.

Returns:
the SchemaObjectManager for dealing with dependencies in this provider.

updateObjects

void updateObjects(ResultSet rs,
                   boolean replace,
                   boolean cascade)
                   throws DBException
Updates the definition of a set of objects. The changes required are described by the ResultSet which must have been created using the DiffEngine returned by getDiffEngine() The 'change' maybe to create, alter, or delete objects.

Parameters:
rs - the changes described as a ResultSet - this should be a LIST ResultSet 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)
Throws:
DBException

updateObject

void updateObject(SchemaObject oldObject,
                  SchemaObject newObject)
                  throws DBException
Updates the definition of an object.

Parameters:
oldObject - the old version of the object
newObject - the new version of the object
Throws:
DBException - if the update fails

updateObjects

void updateObjects(SchemaObject[] oldObjects,
                   SchemaObject[] newObjects)
                   throws DBException
Updates the definition of a set of objects.

Parameters:
oldObject - the old version of the objects
newObject - the new version of the objects
Throws:
DBException - if the update fails

listObjects

java.lang.String[] listObjects(java.lang.String objectType,
                               Schema schema)
                               throws DBException
Lists the objects of a given type available from this provider.

Parameters:
objectType - the type of objects to list
schema - the schema to list from
Returns:
an array of object names
Throws:
DBException

listObjects

java.lang.String[] listObjects(java.lang.String objectType,
                               Schema schema,
                               java.lang.String ref)
                               throws DBException
Lists the objects of a given type available from this provider.

Parameters:
objectType - the type of objects to list
schema - the schema to list from
ref - a pattern to match against.
Returns:
an array of object names
Throws:
DBException

listObjects

SchemaObject[] listObjects(java.lang.String[] objectTypes,
                           Schema schema)
                           throws DBException
Lists the objects of multiple types available from this provider.

Parameters:
objectTypes - an array of Strings representing the desired types
schema - the Schema to list from
Returns:
an array of SchemaObjects representing the objects
Throws:
DBException - if an error is encountered listing the objects

listObjects

SchemaObject[] listObjects(java.lang.String[] objectTypes,
                           Schema schema,
                           java.lang.String ref)
                           throws DBException
Lists the objects of multiple types available from this provider.

Parameters:
objectTypes - an array of Strings representing the desired types
schema - the Schema to list from
ref - a pattern to match against.
Returns:
an array of SchemaObjects representing the objects
Throws:
DBException - if an error is encountered listing the objects

getTimestamp

java.lang.Long getTimestamp(java.lang.String objectType,
                            Schema schema,
                            java.lang.String name)
                            throws DBException
Retrieves the timestamp representing the last modification time of the specified object's metadata. If the provider does not provide timestamp information for metadata, a null value should be returned.

Parameters:
objectType - a String containing the type of the object
schema - the Schema containing the object
name - a String containing the name of the object
Returns:
the timestamp as a Long value
Throws:
DBException - if an error is encountered listing the objects

getTimestamp

java.lang.Long getTimestamp(DBObjectID id)
                            throws DBException
Throws:
DBException

listObjectTypes

java.lang.String[] listObjectTypes()
Lists the database object types supported by this DBObjectProvider. These types can then be used with listObjects to retrieve the objects of a given type.

Returns:
an array of strings containing the supported types of objects
See Also:
listObjects(java.lang.String, oracle.javatools.db.Schema)

supportsObjectType

boolean supportsObjectType(java.lang.String type)
Convinience method to check whether this provider supports the given object type - i.e. whether it is contained in the array returned by listObjectTypes().

See Also:
listObjectTypes()

listSupportedDataTypes

DataType[] listSupportedDataTypes()
Retrieves the list of datatypes supported by this provider.

Returns:
an array of DataType objects representing the supported datatypes.

getDataType

DataType getDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name.

Parameters:
typeName - a String containing the name of the datatype.
Returns:
the DataType represented by the specified name or null if none can be found.

getOrCreateDataType

DataType getOrCreateDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name.

Parameters:
typeName - a String containing the name of the datatype.
Returns:
the DataType represented by the specified name. If none can be found, creates a UserDataType and registers this with the provider.

listSchemas

Schema[] listSchemas()
                     throws DBException
Retrieves the list of schemas available from this provider regardless of their visibility to the user.

Returns:
an array of schemas
Throws:
DBException
See Also:
listSchemas(boolean)

listSchemas

Schema[] listSchemas(boolean showAll)
                     throws DBException
Retrieves the list of schemas available from this provider. The list is optionally restricted to those schemas containing objects belonging (or visible to) the user.

Parameters:
showAll - if false, only schemas containing objects belonging to (or visible to) the user are returned
Returns:
an array of schemas
Throws:
DBException - if an error is encountered listing the schemas.

getSchema

Schema getSchema(java.lang.String name)
                 throws DBException
Retrieves the Schema object associated with a specific name.

Parameters:
name - a string containing the name of the schema
Returns:
a Schema representing the schema
Throws:
DBException - if an error is encountered getting the schema

getDefaultSchema

Schema getDefaultSchema()
                        throws DBException
Returns the default schema for the provider.

Throws:
DBException

canCreate

boolean canCreate(Schema schema,
                  boolean replace)
Whether an attempt to create the specified schema is likely to succeed.

Parameters:
schema - the Schema describing the object to create
replace - whether to replace an existing schema. If replace is false and the schema exists, canCreate must return false.
Returns:
whether the create will succeed.

createSchema

void createSchema(Schema schema,
                  boolean replace)
                  throws DBException
Causes the creation of a new Schema in the persistent storage.

Parameters:
schema - the schema being created
replace - whether to replace an existing schema
Throws:
DBException - if an error is encountered creating the schema

updateSchema

void updateSchema(Schema oldSchema,
                  Schema newSchema)
                  throws DBException
Updates the definition of a Schema.

Parameters:
oldSchema - the old version of the schema
newSchema - the new version of the schema
Throws:
DBException - if the update fails

canDelete

boolean canDelete(Schema schema,
                  boolean cascade)
Checks to see whether a specific schema can be deleted.

Parameters:
schema - the object to check
cascade - whether to assume a cascading delete should be used.
Returns:
whether the delete, if attempted, would succeed.

deleteSchema

void deleteSchema(Schema schema,
                  boolean cascade)
                  throws DBException
Deletes the schema.

Parameters:
schema - the schema to delete
cascade - whether to delete dependent objects (i.e. all SchemaObjects contained in the Schema).
Throws:
DBException - if an error is encountered performing the delete

getDiffEngine

DiffEngine getDiffEngine()
Returns a diff engine setup with the appropriate set of differs for object updating.

Providers which do not support object updating should return null.


isEditable

boolean isEditable(DBObject object)
Returns whether or not the object can be edited


getDefaultTemplateForType

SchemaObject getDefaultTemplateForType(java.lang.String type)
Returns the default template object for the given type, or null if none defined


setDefaultTemplateForType

void setDefaultTemplateForType(java.lang.String type,
                               SchemaObject template)
Sets the default template object for the given type.


isNewFromTemplateType

boolean isNewFromTemplateType(java.lang.String type)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.