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

E13403-02

oracle.javatools.db
Class AbstractSchemaObject

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractSchemaObject
All Implemented Interfaces:
DBObject, SchemaObject, Copyable, DynamicPropertySet
Direct Known Subclasses:
DatabaseLink, Directory, Index, Indextype, Java, MaterializedViewLog, PlSql, RecycledObject, Relation, Sequence, Synonym, XMLSchema

public abstract class AbstractSchemaObject
extends AbstractDBObject
implements SchemaObject

Provides a base implementation of the SchemaObject interface.

Since:
9.0.5

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
protected AbstractSchemaObject()
          Constructs a new instance.
protected AbstractSchemaObject(java.lang.String name, Schema schema)
          Constructs a new instance with the specified name and schema.
protected AbstractSchemaObject(java.lang.String name, Schema schema, DBObjectID id)
          Constructs a new instance with the specified name and schema.
 
Method Summary
 void addObjectListener(SchemaObjectListener list)
          Attaches a listener to this object to listen for change events.
protected  void checkInit()
          Checks that the whole object is initialized (built).
protected  void checkInit(java.lang.String key)
          Checking initialisation with no key, is the came as initializing the whole object, and is what checkInit() does.
protected  void checkInitEx(java.lang.String key)
           
protected  void copyToImpl(AbstractSchemaObject copy, DBObject copyParent, IDPolicy idPolicy)
           
protected  boolean equalsImpl(AbstractSchemaObject target)
           
 void fireObjectUpdated(DBObjectChange change)
          Notifies any registered listeners of the change to this object.
protected  void getOwnedObjectsImpl(java.util.Collection<DBObject> c, java.lang.String... types)
          Implementation first checks that the object has been built - then returns the collection from suprt.getOwnedObjectsImpl().
 DBObject getParent()
          Returns the parent of this object, if one exists.
 java.util.Map getProperties()
          Returns null if no properties are set.
 java.lang.Object getProperty(java.lang.String key)
          Retrieves the value associated with a property.
 java.lang.Object getProperty(java.lang.String key, java.lang.Object defaultValue)
          Retrieves the value associated with a property.
protected  void getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
          Implementation first checks that the object has been built - then returns the collection from suprt.getReferenceIDsImpl().
 Schema getSchema()
          Gets the Schema of this object.
protected  boolean needsInitialization()
           
 void removeObjectListener(SchemaObjectListener list)
          Removes the given listener from the list of registered listeners for this class.
 void setProperties(java.util.Map properties)
          Sets the properties of this object to be those in the given Map.
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets the value for a property.
 void setSchema(Schema schema)
          Sets the Schema of this object.
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, copyToImpl, equalsImpl, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, getType, replaceReferenceIDs, setID, setName
 

Constructor Detail

AbstractSchemaObject

protected AbstractSchemaObject()
Constructs a new instance.


AbstractSchemaObject

protected AbstractSchemaObject(java.lang.String name,
                               Schema schema,
                               DBObjectID id)
Constructs a new instance with the specified name and schema.

Parameters:
name - a string representing the name of the object
schema - a string representing the schema containing the object
id - the ID for this object

AbstractSchemaObject

protected AbstractSchemaObject(java.lang.String name,
                               Schema schema)
Constructs a new instance with the specified name and schema.

Parameters:
name - a string representing the name of the object
schema - a string representing the schema containing the object
Method Detail

copyToImpl

protected void copyToImpl(AbstractSchemaObject copy,
                          DBObject copyParent,
                          IDPolicy idPolicy)

equalsImpl

protected boolean equalsImpl(AbstractSchemaObject target)

setSchema

public void setSchema(Schema schema)
Description copied from interface: SchemaObject
Sets the Schema of this object.

Specified by:
setSchema in interface SchemaObject
Parameters:
schema - the Schema containing this object

getSchema

public Schema getSchema()
Description copied from interface: SchemaObject
Gets the Schema of this object.

Specified by:
getSchema in interface SchemaObject
Returns:
schema the Schema containing this object

needsInitialization

protected boolean needsInitialization()

checkInit

protected void checkInit(java.lang.String key)
Checking initialisation with no key, is the came as initializing the whole object, and is what checkInit() does.


checkInitEx

protected void checkInitEx(java.lang.String key)
                    throws DBException
Throws:
DBException

checkInit

protected void checkInit()
Checks that the whole object is initialized (built).


getParent

public DBObject getParent()
Description copied from interface: DBObject
Returns the parent of this object, if one exists. This does not return the Schema for a SchemaObject. Schema's are not considered part of the ownership parent tree.

Specified by:
getParent in interface DBObject

getOwnedObjectsImpl

protected void getOwnedObjectsImpl(java.util.Collection<DBObject> c,
                                   java.lang.String... types)
Implementation first checks that the object has been built - then returns the collection from suprt.getOwnedObjectsImpl(). All overrides must call this first to ensure the object has been built.

Overrides:
getOwnedObjectsImpl in class AbstractDBObject
Parameters:
c - a Collection of the apppropriate children.
types - a vararg of the type(s) to search for
See Also:
AbstractDBObject.includesType(java.lang.String, java.lang.String...)

getReferenceIDsImpl

protected void getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
Implementation first checks that the object has been built - then returns the collection from suprt.getReferenceIDsImpl(). All overrides must call this first to ensure the object has been built.

Overrides:
getReferenceIDsImpl in class AbstractDBObject
Parameters:
refs - the collection of ids this object references

removeObjectListener

public final void removeObjectListener(SchemaObjectListener list)
Description copied from interface: SchemaObject
Removes the given listener from the list of registered listeners for this class.

Specified by:
removeObjectListener in interface SchemaObject
See Also:
SchemaObjectListener

addObjectListener

public final void addObjectListener(SchemaObjectListener list)
Description copied from interface: SchemaObject
Attaches a listener to this object to listen for change events.

Specified by:
addObjectListener in interface SchemaObject
See Also:
SchemaObjectListener

fireObjectUpdated

public final void fireObjectUpdated(DBObjectChange change)
Description copied from interface: SchemaObject
Notifies any registered listeners of the change to this object.

Specified by:
fireObjectUpdated in interface SchemaObject

getProperties

public java.util.Map getProperties()
Description copied from class: AbstractDBObject
Returns null if no properties are set.

Specified by:
getProperties in interface DynamicPropertySet
Overrides:
getProperties in class AbstractDBObject

getProperty

public java.lang.Object getProperty(java.lang.String key)
Description copied from interface: DynamicPropertySet
Retrieves the value associated with a property.

Specified by:
getProperty in interface DynamicPropertySet
Overrides:
getProperty in class AbstractDBObject
Parameters:
key - the property key for which a value is desired. exists.
Returns:
the value of the requested property, or a null value if the property does not exist or is not set.

getProperty

public java.lang.Object getProperty(java.lang.String key,
                                    java.lang.Object defaultValue)
Description copied from interface: DynamicPropertySet
Retrieves the value associated with a property. If no value exists for the requested property, the specified default value is returned.

Specified by:
getProperty in interface DynamicPropertySet
Overrides:
getProperty in class AbstractDBObject
Parameters:
key - the property key for which a value is desired.
defaultValue - the value to return if no value currently exists.
Returns:
the value of the requested property, or the default value if the property does not exist.

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Description copied from interface: DynamicPropertySet
Sets the value for a property. Setting a value to null removes that property.

Specified by:
setProperty in interface DynamicPropertySet
Overrides:
setProperty in class AbstractDBObject
Parameters:
key - the property key to set
value - the value to set

setProperties

public void setProperties(java.util.Map properties)
Description copied from class: AbstractDBObject
Sets the properties of this object to be those in the given Map. The keys in the map must be Strings.

Specified by:
setProperties in interface DynamicPropertySet
Overrides:
setProperties in class AbstractDBObject

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.