|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.javatools.db.AbstractDBObjectProvider
public abstract class AbstractDBObjectProvider
Provides a base implementation of the DBObjectProvider
interface. AbstractDBObjectProvider
provides support for
registering DBObjectBuilder
instances for building specific
types of DBObject
s. The list of builders is used to determine
the types of objects supported by the DBObjectProvider
implementation, to list the available objects of a specific type, and to
retrieve the SchemaObject representations of the objects.
Subclasses are responsible for ensuring that DBObjectBuilder and DBObjectValidator instances are registered for the types of objects that will be supported. AbstractDBObjectProvider is abstract; sublasses are also responsible for providing implementations of those methods that do not have a generic implementation.
AbstractDBObjectProvider
also handles caching of
DBObject
instances. When new instances are created, they are
stored in a WeakHashMap. Subsequent requests for the same metadata will
result in the same DBObject
instance being returned.
Field Summary | |
---|---|
static int |
CASE_SENSITIVE_NAME_POLICY
Names are case sensitive and stored in mixed case |
protected static java.lang.String[] |
EMPTY_LIST
|
static int |
LOWER_CASE_NAME_POLICY
Names are case insensitive and stored in lower case |
static int |
MIXED_CASE_NAME_POLICY
Names are case insensitive and stored in mixed case |
static java.lang.String |
TIMESTAMP_PROPERTY
|
static int |
UPPER_CASE_NAME_POLICY
Names are case insensitive and stored in upper case |
Fields inherited from interface oracle.javatools.db.DBObjectProvider |
---|
CREATE_PRIVILEDGE, DELETE_PRIVILEDGE, MODIFY_PRIVILEDGE, NEW_FROM_TEMPLATE_TYPE |
Constructor Summary | |
---|---|
AbstractDBObjectProvider()
|
Method Summary | |
---|---|
void |
addProviderListener(DBObjectProviderListener list)
Adds the given listener to this provider to listen for provider and schema events. |
protected void |
cacheObject(SchemaObject object,
boolean loadOperation)
Adds an object to the cache. |
protected void |
clearAllCaches()
Clears all the object caches. |
protected void |
clearCache(java.lang.String type)
Clears the cache of objects of the specified type. |
static java.lang.String |
convertObject(DBObject obj)
Converts a DBObject into a String representation of the object name. |
protected SchemaObject |
createByIDImpl(DBObjectID id)
|
void |
createObject(SchemaObject obj,
boolean replace)
Causes the creation of the object described by the specified meta data. |
protected SchemaObjectManager |
createObjectManager()
Creates the object manager for this provider. |
protected SchemaObject |
createSchemaObjectImpl(java.lang.String type,
Schema schema,
java.lang.String name)
Uses listObjectsImpl to find or create an object with the given type, schema and name. |
void |
deleteObject(SchemaObject obj,
boolean cascade)
Deletes the object. |
void |
destroyCache()
Destroys the object cache. |
protected DBObject |
findByID(DBObjectID id)
|
protected SchemaObject |
findObject(DBObjectID id)
Looks for the specified object id in the cache. |
protected SchemaObject |
findObject(java.lang.String type,
Schema schema,
java.lang.String name)
Looks for the specified object in the cache. |
void |
fireObjectsAdded(Schema schema,
SchemaObject[] objs)
Notifies all listeners that objects have been added to the given schema. |
protected void |
fireObjectsRemoved(Schema schema,
SchemaObject[] objs)
Notifies all listeners that objects have been removed from the given schema. |
protected void |
fireProviderClosed()
Fires a providerClosed event to all listeners. |
void |
fireProviderDeleted()
Fires a providerClosed event to all listeners. |
protected void |
fireProviderOpened()
Fires a providerOpened event to all listeners. |
protected void |
fireProviderReloaded()
Fires a providerReloaded event to all listeners. |
protected void |
fireSchemaAdded(Schema schema)
Notifies all listeners that the given Schema has been added to this provider. |
protected void |
fireSchemaObjectUpdated(DBObjectChange change)
Notifies all listeners of an update to a SchemaObject. |
protected void |
fireSchemaRemoved(Schema schema)
Notifies all listeners that the given Schema has been removed from this provider. |
protected void |
fireSchemaUpdated(DBObjectChange change)
Notifies all listeners of an update to a Schema. |
protected DBObjectBuilder |
getBuilderForType(java.lang.String type)
Retrieves the DBObjectBuilder registered for a type of object. |
protected int |
getCasePolicy()
Retrieves the provider's case policy for unquoted names. |
DataType |
getDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name. |
SchemaObject |
getDefaultTemplateForType(java.lang.String type)
Returns the default template object for the given type, or null if none defined |
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. |
protected java.lang.Long |
getExternalTimestamp(SchemaObject object)
Retrieves the external timestamp for the specified object. |
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. |
protected java.util.logging.Logger |
getLogger()
Gets the logger to use in this provider. |
protected abstract java.lang.String |
getName()
Returns an identifier for this provider. |
SchemaObject |
getObject(java.lang.String objectType,
Schema schema,
java.lang.String name)
Retrieves the SchemaObject representing a specific database object. |
protected SchemaObject |
getObjectImpl(java.lang.String objectType,
Schema schema,
java.lang.String name)
|
SchemaObjectManager |
getObjectManager()
Returns the object manager for dealing with dependencies in this provider. |
DataType |
getOrCreateDataType(java.lang.String typeName)
Retrieves the datatype represented by a specific name. |
PropertyManager |
getPropertyManager()
Returns the PropertyManager implementation for this provider. |
protected int |
getQuotedNameCasePolicy()
Retrieves the provider's case policy for quoted names. |
protected SchemaObjectExpander[] |
getSchemaObjectExpanders()
|
java.lang.Long |
getTimestamp(DBObjectID id)
|
java.lang.Long |
getTimestamp(java.lang.String type,
Schema schema,
java.lang.String objectName)
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)
Returns a unique name for an object of given type within contextObject
using base name. |
protected DBObjectValidator |
getValidatorForType(java.lang.String type)
Retrieves the DBObjectValidator registered for a type of object. |
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)
|
protected boolean |
isRequestedObject(SchemaObject object,
java.lang.String type,
Schema schema,
java.lang.String name)
Returns true if SchemaObject object is of type type, owned by schema schema, and named name. |
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. |
protected java.util.Collection<SchemaObject> |
listObjectsFromCache(java.lang.String[] objectTypes,
Schema schema,
java.lang.String ref)
Lists the objects that are in the internal memory cache for this provider. |
protected abstract java.util.Collection<SchemaObject> |
listObjectsImpl(java.lang.String[] objectTypes,
Schema schema,
java.lang.String ref)
Internal listObjects implementation. |
protected java.lang.String[] |
listObjectsImpl(java.lang.String type,
Schema schema,
java.lang.String ref)
Retrieves the list of objects by using a registered builder. |
java.lang.String[] |
listObjectTypes()
Returns a sorted array of the object types supported in this provider. |
DataType[] |
listSupportedDataTypes()
Retrieves the list of datatypes supported by this provider. |
protected void |
logEvent(java.lang.String msg,
java.lang.Object... params)
Use to log provider events. |
protected void |
markForLazyInit(AbstractSchemaObject object)
|
protected java.lang.String |
normaliseType(java.lang.String type)
|
java.lang.String |
quoteIdentifier(java.lang.String internalName,
boolean force)
Determines if internalName needs quoting to make it a valid external name, and if so returns a quoted copy of it. |
protected void |
registerBuilder(java.lang.String type,
DBObjectBuilder builder)
Registers a Builder for a specific object type. |
protected abstract void |
registerExpanders()
|
protected void |
registerSchemaObjectExpander(SchemaObjectExpander expander)
|
protected void |
registerType(java.lang.String type,
DBObjectBuilder builder,
DBObjectValidator validator)
Registers a Builder and Validator for a specific object type. |
protected void |
registerValidator(java.lang.String type,
DBObjectValidator validator)
Registers a Validator for a specific object type. |
void |
removeProviderListener(DBObjectProviderListener list)
Removed the given listener from this provider. |
protected void |
resetSchemaObject(SchemaObject object,
SchemaObject listed,
java.lang.Long timestamp)
If it has been noticed that the timestamp has changed on an object, or we have updated it in the database, we want to turn it back into an object that needs building again. |
protected void |
schemaUpdated(DBObjectChange change)
Override to implement any functionality that needs to be fired when a schema has been updated in the 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. |
boolean |
supportsTimestamps()
Returns true if this provider supports object timestamping. |
protected void |
uncacheObject(SchemaObject object)
Removes an object from the cache. |
protected void |
unregisterBuilder(java.lang.String type)
Removes a registered Builder. |
protected void |
unregisterValidator(java.lang.String type)
Removes a registered Validator. |
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 |
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. |
void |
validateObject(DBObject object)
Validates the given object using the DBObjectValidator registered against that object's type. |
void |
validateObject(DBObject original,
DBObject update)
Validates the given object update using the DBObjectValidator registered against that object's type. |
void |
validateObject(DBObject original,
DBObject update,
java.lang.String property)
Deprecated. |
void |
validateObject(DBObject object,
java.lang.String property)
Deprecated. |
void |
validateObjectProperty(DBObject original,
DBObject update,
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 update)
Deprecated. use validateObject( DBObject original, DBObject update ) |
void |
validateUniqueName(java.lang.String type,
DBObject contextObject,
java.lang.String name)
Validates that a name is not used within the context DBObject, and throws NameInUseException if it is. |
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.DBObjectProvider |
---|
canCreate, canCreate, canDelete, canDelete, createObjects, createSchema, deleteObjects, deleteSchema, getDefaultSchema, getDescriptor, getSchema, listSchemas, listSchemas, undeleteObject, undeleteObjects, updateObjects, updateSchema |
Field Detail |
---|
public static final int MIXED_CASE_NAME_POLICY
public static final int LOWER_CASE_NAME_POLICY
public static final int UPPER_CASE_NAME_POLICY
public static final int CASE_SENSITIVE_NAME_POLICY
public static final java.lang.String TIMESTAMP_PROPERTY
protected static final java.lang.String[] EMPTY_LIST
Constructor Detail |
---|
public AbstractDBObjectProvider()
Method Detail |
---|
public final void removeProviderListener(DBObjectProviderListener list)
removeProviderListener
in interface DBObjectProvider
DBObjectProviderListener
public final void addProviderListener(DBObjectProviderListener list)
addProviderListener
in interface DBObjectProvider
DBObjectProviderListener
protected final void fireProviderClosed()
public final void fireProviderDeleted()
protected final void fireProviderOpened()
protected final void fireProviderReloaded()
protected final void fireSchemaAdded(Schema schema)
protected final void fireSchemaUpdated(DBObjectChange change)
protected final void fireSchemaObjectUpdated(DBObjectChange change)
protected final void fireSchemaRemoved(Schema schema)
public final void fireObjectsAdded(Schema schema, SchemaObject[] objs)
protected final void fireObjectsRemoved(Schema schema, SchemaObject[] objs)
protected void schemaUpdated(DBObjectChange change)
protected final void registerType(java.lang.String type, DBObjectBuilder builder, DBObjectValidator validator)
type
- a string containing the object typebuilder
- the Builder instance to use for the specified typevalidator
- the Validator instance to use for the specified typeDBObject.getType()
protected final void registerBuilder(java.lang.String type, DBObjectBuilder builder)
type
- a string containing the object typebuilder
- the Builder instance to use for the specified typeDBObject.getType()
protected final void unregisterBuilder(java.lang.String type)
type
- a string containing the object type whose builder should
be removedregisterBuilder(java.lang.String, oracle.javatools.db.DBObjectBuilder)
,
DBObject.getType()
protected DBObjectBuilder getBuilderForType(java.lang.String type)
type
- a string containing the object type
null
if no builder is registeredprotected final void registerValidator(java.lang.String type, DBObjectValidator validator)
type
- a string containing the object typevalidator
- the Validator instance to use for the specified typeDBObject.getType()
protected final void unregisterValidator(java.lang.String type)
type
- a string containing the object type whose validator should
be removedregisterValidator(java.lang.String, oracle.javatools.db.DBObjectValidator)
,
DBObject.getType()
protected final DBObjectValidator getValidatorForType(java.lang.String type)
type
- a string containing the object type
null
if no validator is registeredprotected SchemaObject findObject(java.lang.String type, Schema schema, java.lang.String name)
type
- a string containing the type of objectschema
- the schema owning the objectname
- a string containing the name of the object
SchemaObject
representing
the specified object, or null>/code> if the object does
not exist in the cache
protected final SchemaObject findObject(DBObjectID id)
id
- the id of the object
SchemaObject
representing
the specified object, or null
if the object does
not exist in the cachepublic void destroyCache()
protected final void clearCache(java.lang.String type)
type
- a string containing the type of object for which the
cache should be clearedprotected final void clearAllCaches()
public SchemaObjectManager getObjectManager()
getObjectManager
in interface DBObjectProvider
protected SchemaObjectManager createObjectManager()
protected void cacheObject(SchemaObject object, boolean loadOperation)
object
- the SchemaObject needing to be cachedloadOperation
- this is a load of the object, not a create or update.protected final void uncacheObject(SchemaObject object)
object
- the SchemaObject needing to be removed from the cacheprotected java.lang.String[] listObjectsImpl(java.lang.String type, Schema schema, java.lang.String ref) throws DBException
type
- a string containg the type of object to listschema
- the schemaref
- a string containing a pattern to match object names against
DBException
protected abstract java.util.Collection<SchemaObject> listObjectsImpl(java.lang.String[] objectTypes, Schema schema, java.lang.String ref) throws DBException
DBException
protected final java.util.Collection<SchemaObject> listObjectsFromCache(java.lang.String[] objectTypes, Schema schema, java.lang.String ref)
protected SchemaObject getObjectImpl(java.lang.String objectType, Schema schema, java.lang.String name) throws DBException
DBException
public boolean supportsTimestamps()
getProperties()
)
under the TIMESTAMP_PROPERTY key.
Returns false by default.
TIMESTAMP_PROPERTY
public final java.lang.Long getTimestamp(java.lang.String type, Schema schema, java.lang.String objectName) throws DBException
DBObjectProvider
null
value should be returned.
getTimestamp
in interface DBObjectProvider
type
- a String containing the type of the objectschema
- the Schema containing the objectobjectName
- a String containing the name of the object
DBException
- if an error is encountered listing the objectspublic final java.lang.Long getTimestamp(DBObjectID id) throws DBException
getTimestamp
in interface DBObjectProvider
DBException
protected DBObject findByID(DBObjectID id) throws DBException
DBException
protected void resetSchemaObject(SchemaObject object, SchemaObject listed, java.lang.Long timestamp)
object
- the object we want to have cached and resetlisted
- an object returned by a list/find which is potentially in
the cache, and potentially has a different id.timestamp
- the timestamp for the new object (can be null)protected SchemaObject createSchemaObjectImpl(java.lang.String type, Schema schema, java.lang.String name) throws DBException
DBException
protected boolean isRequestedObject(SchemaObject object, java.lang.String type, Schema schema, java.lang.String name)
object
- the object to be matchedtype
- the type of the requested objectschema
- the owner of the requested objectname
- the name of the requested objectprotected SchemaObject createByIDImpl(DBObjectID id) throws DBException
DBException
protected java.lang.Long getExternalTimestamp(SchemaObject object) throws DBException
object
-
DBException
protected final void markForLazyInit(AbstractSchemaObject object)
public static java.lang.String convertObject(DBObject obj)
obj
- the DBObject
null
, an empty String is returned.public java.lang.String getIdentifierQuoteString()
DBObjectProvider
null
.
getIdentifierQuoteString
in interface DBObjectProvider
public java.lang.String[] listObjectTypes()
listObjectTypes
in interface DBObjectProvider
DBObjectProvider.listObjects(java.lang.String, oracle.javatools.db.Schema)
public boolean supportsObjectType(java.lang.String type)
DBObjectProvider
supportsObjectType
in interface DBObjectProvider
DBObjectProvider.listObjectTypes()
public java.lang.String[] listObjects(java.lang.String objectType, Schema schema) throws DBException
DBObjectProvider
listObjects
in interface DBObjectProvider
objectType
- the type of objects to listschema
- the schema to list from
DBException
public final java.lang.String[] listObjects(java.lang.String objectType, Schema schema, java.lang.String ref) throws DBException
DBObjectProvider
listObjects
in interface DBObjectProvider
objectType
- the type of objects to listschema
- the schema to list fromref
- a pattern to match against.
DBException
public SchemaObject[] listObjects(java.lang.String[] objectTypes, Schema schema) throws DBException
DBObjectProvider
listObjects
in interface DBObjectProvider
objectTypes
- an array of Strings representing the desired typesschema
- the Schema to list from
DBException
- if an error is encountered listing the objectspublic final SchemaObject[] listObjects(java.lang.String[] objectTypes, Schema schema, java.lang.String ref) throws DBException
DBObjectProvider
listObjects
in interface DBObjectProvider
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 objectspublic SchemaObject getObject(java.lang.String objectType, Schema schema, java.lang.String name) throws DBException
DBObjectProvider
getObject
in interface DBObjectProvider
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 boolean hasPriviledge(java.lang.String type, Schema schema, java.lang.String priv)
hasPriviledge
in interface DBObjectProvider
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 void createObject(SchemaObject obj, boolean replace) throws DBException
DBObjectProvider
createObject
in interface DBObjectProvider
obj
- 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 deleteObject(SchemaObject obj, boolean cascade) throws DBException
DBObjectProvider
deleteObject
in interface DBObjectProvider
obj
- the object to deletecascade
- whether to delete dependent objects
DBException
- if an error is encountered performing the deletepublic void updateObject(SchemaObject oldObject, SchemaObject newObject) throws DBException
DBObjectProvider
updateObject
in interface DBObjectProvider
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
DBObjectProvider
updateObjects
in interface DBObjectProvider
DBException
- if the update failspublic PropertyManager getPropertyManager()
protected final int getCasePolicy()
LOWER_CASE_NAME_POLICY
,
MIXED_CASE_NAME_POLICY
,
UPPER_CASE_NAME_POLICY
,
CASE_SENSITIVE_NAME_POLICY
protected final int getQuotedNameCasePolicy()
LOWER_CASE_NAME_POLICY
,
MIXED_CASE_NAME_POLICY
,
UPPER_CASE_NAME_POLICY
,
CASE_SENSITIVE_NAME_POLICY
@Deprecated public final boolean isValidName(java.lang.String name)
isValidName
in interface DBObjectProvider
name
- the name to check
DBObjectProvider.isValidName(java.lang.String, java.lang.String)
public final boolean isValidName(java.lang.String type, java.lang.String name)
isValidName
in interface DBObjectProvider
name
- the name to checktype
- the type of object the name is intended for
@Deprecated public final void validateName(java.lang.String name) throws InvalidNameException
validateName
in interface DBObjectProvider
name
- the name to check
InvalidNameException
- with appropriate message if the name is
invalid.DBObjectProvider.validateName(java.lang.String, java.lang.String)
public final void validateName(java.lang.String type, java.lang.String name) throws InvalidNameException
validateName
in interface DBObjectProvider
type
- the type of object the name is itended forname
- the name to check
InvalidNameException
- with appropriate message if the name is
invalid.public final java.lang.String quoteIdentifier(java.lang.String internalName, boolean force) throws DBException
quoteIdentifier
in interface DBObjectProvider
internalName
- force
- Always quote the name
DBException
public final java.lang.String getInternalName(java.lang.String name, java.lang.String objectType)
DBObjectProvider
getInternalName
in interface DBObjectProvider
name
- a String containing the name to convertobjectType
- a String containing the type of object being named
public final java.lang.String getInternalName(java.lang.String name)
DBObjectProvider
getInternalName
in interface DBObjectProvider
name
- a String containing the name to convert
public final java.lang.String getExternalName(java.lang.String name, java.lang.String objectType)
DBObjectProvider
quoteIdentifier
, specifying false
for the
force argument. Note, however, that exceptions are not thrown; rather, the
original name will be returned.
getExternalName
in interface DBObjectProvider
name
- a String containing the name to externalizeobjectType
- a String containing the type of object being named
public final java.lang.String getExternalName(java.lang.String name)
DBObjectProvider
quoteIdentifier
, specifying false
for the
force argument. Note, however, that exceptions are not thrown; rather, the
original name will be returned.
getExternalName
in interface DBObjectProvider
name
- a String containing the name to externalize
public DataType[] listSupportedDataTypes()
DBObjectProvider
listSupportedDataTypes
in interface DBObjectProvider
DataType
objects representing the
supported datatypes.public DataType getDataType(java.lang.String typeName)
DBObjectProvider
getDataType
in interface DBObjectProvider
typeName
- a String containing the name of the datatype.
public DataType getOrCreateDataType(java.lang.String typeName)
DBObjectProvider
getOrCreateDataType
in interface DBObjectProvider
typeName
- a String containing the name of the datatype.
UserDataType
and registers this
with the provider.public void validateObject(DBObject object) throws ValidationException
validateObject
in interface DBObjectProvider
object
- The object to validate
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.@Deprecated public final void validateObject(DBObject object, java.lang.String property) throws ValidationException
validateObject
in interface DBObjectProvider
ValidationException
public void validateObjectProperty(DBObject object, java.lang.Object property) throws ValidationException
DBObjectProvider
DBObjectProvider.validateObject(DBObject)
is called.
validateObjectProperty
in interface DBObjectProvider
object
- The object to validateproperty
- An identifier for a specific property to validate
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.@Deprecated public void validateSchema(Schema schema) throws ValidationException
DBObjectProvider
validateSchema
in interface DBObjectProvider
schema
- The Schema to validate
ValidationException
- if the Schema is not valid. The exception will
describe the validation failure.public void validateObject(DBObject original, DBObject update) throws ValidationException
validateObject
in interface DBObjectProvider
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.@Deprecated public final void validateObject(DBObject original, DBObject update, java.lang.String property) throws ValidationException
validateObject
in interface DBObjectProvider
ValidationException
public void validateObjectProperty(DBObject original, DBObject update, java.lang.Object property) throws ValidationException
DBObjectProvider
DBObjectProvider.validateObject(DBObject,DBObject)
is called.
validateObjectProperty
in interface DBObjectProvider
original
- The original version of the edited objectupdate
- The edited object to validateproperty
- An identifier for a specific property to validate
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.@Deprecated public void validateSchema(Schema original, Schema update) throws ValidationException
DBObjectProvider
validateSchema
in interface DBObjectProvider
ValidationException
- if the updated schema is not valid. The
exception will describe the validation failure.public void validateUniqueName(java.lang.String type, DBObject contextObject, java.lang.String name) throws NameInUseException
validateUniqueName
in interface DBObjectProvider
type
- : the type of name being validatedcontextObject
- : the database object context to use when determining
the uniqueness of the namename
- : the name to be checked
NameInUseException
public java.lang.String getUniqueName(java.lang.String type, DBObject contextObject, java.lang.String base)
contextObject
using base
name. This default implementation ensures that you
cannot have two SchemaObjects of any type with the same name, two indexes
with the same name or two constraints with the same name, within
contextObject.
getUniqueName
in interface DBObjectProvider
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.
protected java.lang.String normaliseType(java.lang.String type)
public DiffEngine getDiffEngine()
DBObjectProvider
Providers which do not support object updating should return null.
getDiffEngine
in interface DBObjectProvider
protected java.util.logging.Logger getLogger()
protected void logEvent(java.lang.String msg, java.lang.Object... params)
protected abstract java.lang.String getName()
public boolean isEditable(DBObject object)
DBObjectProvider
isEditable
in interface DBObjectProvider
public SchemaObject getDefaultTemplateForType(java.lang.String type)
getDefaultTemplateForType
in interface DBObjectProvider
public void setDefaultTemplateForType(java.lang.String type, SchemaObject template)
setDefaultTemplateForType
in interface DBObjectProvider
public boolean isNewFromTemplateType(java.lang.String type)
isNewFromTemplateType
in interface DBObjectProvider
protected abstract void registerExpanders()
protected void registerSchemaObjectExpander(SchemaObjectExpander expander)
protected SchemaObjectExpander[] getSchemaObjectExpanders()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |