|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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:
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. |
Method Summary | |
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. |
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. |
Schema |
getSchema(java.lang.String name)
Retrieves the Schema object associated with a specific name. |
java.lang.String |
getUniqueName(java.lang.String type,
Schema schema,
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 |
isValidName(java.lang.String name)
Checks to see whether a name is valid. |
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. |
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 |
updateObject(SchemaObject oldObject,
SchemaObject newObject)
Updates the definition of an object. |
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 |
validateObject(SchemaObject object)
Checks to see if the object is valid. |
void |
validateObject(SchemaObject original,
SchemaObject updated)
Checks to see if the object update is valid. |
Field Detail |
public static final java.lang.String CREATE_PRIVILEDGE
hasPriviledge(java.lang.String, oracle.jdeveloper.cm.ds.db.Schema, java.lang.String)
,
Constant Field Valuespublic static final java.lang.String DELETE_PRIVILEDGE
hasPriviledge(java.lang.String, oracle.jdeveloper.cm.ds.db.Schema, java.lang.String)
,
Constant Field Valuespublic static final java.lang.String MODIFY_PRIVILEDGE
hasPriviledge(java.lang.String, oracle.jdeveloper.cm.ds.db.Schema, java.lang.String)
,
Constant Field ValuesMethod Detail |
public boolean canCreate(SchemaObject object, boolean replace)
object
- the SchemaObject describing the object to createreplace
- whether to replace an existing object. If
replace
is false and the object exists, canCreate must
return false.
public void createObject(SchemaObject object, boolean replace) throws DBException
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.
DBException
- if an error is encountered creating the object.public void createObjects(SchemaObject[] objects, boolean replace) throws DBException
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.
DBException
- if an error is encountered creating the objects.public void deleteObject(SchemaObject object, boolean cascade) throws DBException
object
- the object to deletecascade
- whether to delete dependent objects
DBException
- if an error is encountered performing the deletepublic void deleteObjects(SchemaObject[] objects, boolean cascade) throws DBException
objects
- the objects to deletecascade
- whether to delete dependent objects
DBException
- if an error is encountered performing the deletepublic boolean hasPriviledge(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.
public java.lang.String getUniqueName(java.lang.String type, Schema schema, java.lang.String base)
type
- the type of object to get the name forschema
- a string containing the schema to use when determining
the uniqueness of the namebase
- the base name to use.
public boolean isValidName(java.lang.String name)
name
- the name to check
public 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 invalidpublic java.lang.String getInternalName(java.lang.String name)
name
- a String containing the name to convert
public java.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 named
public 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 externalize
public java.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 named
public java.lang.String getIdentifierQuoteString()
null
.
public boolean canDelete(SchemaObject object, boolean cascade)
object
- the object to checkcascade
- whether to assume a cascading delete should be used.
public void validateObject(SchemaObject object) throws ValidationException
object
- The object to validate
ValidationException
- if the object is not valid. The exception will
describe the validation failure.public void validateObject(SchemaObject original, SchemaObject updated) throws ValidationException
ValidationException
- if the updated object is not valid. The
exception will describe the validation failure.public SchemaObject getObject(java.lang.String objectType, Schema schema, java.lang.String name) throws DBException
objectType
- the type of object desired.schema
- the name of the schema containing the objectname
- the name of the object
DBException
- if an error is encountered retrieving the objectDBObject.getType()
public void updateObject(SchemaObject oldObject, SchemaObject newObject) throws DBException
oldObject
- the old version of the objectnewObject
- the new version of the object
DBException
- if the update failspublic void updateObjects(SchemaObject[] oldObjects, SchemaObject[] newObjects) throws DBException
DBException
- if the update failspublic java.lang.String[] listObjects(java.lang.String objectType, Schema schema) throws DBException
objectType
- the type of objects to listschema
- the schema to list from
DBException
public 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
public java.lang.String[] listObjectTypes()
listObjects(java.lang.String, oracle.jdeveloper.cm.ds.db.Schema)
public DataType[] listSupportedDataTypes()
DataType
objects representing the
supported datatypes.public DataType getDataType(java.lang.String typeName)
typeName
- a String containing the name of the datatype.
public Schema[] listSchemas() throws DBException
DBException
public Schema getSchema(java.lang.String name) throws DBException
name
- a string containing the name of the schema
DBException
- if an error is encountered getting the schemapublic boolean canCreate(Schema schema, boolean replace)
schema
- the Schema describing the object to createreplace
- whether to replace an existing schema. If
replace
is false and the schema exists, canCreate must
return false.
public void createSchema(Schema schema, boolean replace) throws DBException
schema
- the schema being createdreplace
- whether to replace an existing schema
DBException
- if an error is encountered creating the schemapublic void updateSchema(Schema oldSchema, Schema newSchema) throws DBException
oldSchema
- the old version of the schemanewSchema
- the new version of the schema
DBException
- if the update failspublic boolean canDelete(Schema schema, boolean cascade)
schema
- the object to checkcascade
- whether to assume a cascading delete should be used.
public void 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 delete
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.