|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DBObject
Base interface for Database Objects. A database object is not
assumed to exist in a database; rather, it is just something
that
Field Summary | |
---|---|
static java.lang.String |
COMMENT
The comment property. |
Method Summary | |
---|---|
DBObject |
copyTo(DBObject target,
boolean temporaryCopy)
Copies the state of this object to another instance. |
DBObject |
copyTo(DBObject target,
IDPolicy idPolicy)
Copies the state of this object to another instance. |
java.lang.Object |
copyTo(java.lang.Object target)
Implementation of the Copyable interface that copies the state of this DBObject to another instance. |
DBObject |
findOwnedObject(DBObjectID id)
Returns a child of this object that has the given ID. |
DBObject |
findOwnedObject(java.lang.String type,
java.lang.String name)
Returns an object owned by this object with given name and type, if one exists. |
DBObjectID |
getID()
Retrieves the object ID associated with this object. |
java.lang.String |
getName()
Retrieves the name of this object. |
DBObject[] |
getOwnedObjects()
Returns any objects owned by object. |
DBObject[] |
getOwnedObjects(java.lang.String... type)
Returns the objects owned by this object of the given type. |
DBObject |
getParent()
Returns the parent of this object, if one exists. |
DBObjectID[] |
getReferenceIDs()
Returns all the IDs that this object has as properties that reference other DBObjects. |
java.lang.String |
getType()
Returns the type of this object. |
boolean |
replaceReferenceIDs(java.util.Map<DBObjectID,DBObjectID> oldToNew)
Replaces any reference ids (e.g. |
void |
setID(DBObjectID id)
Sets the object ID associated with this object. |
void |
setName(java.lang.String name)
Sets the name of this object. |
Methods inherited from interface oracle.javatools.util.DynamicPropertySet |
---|
getProperties, getProperty, getProperty, setProperties, setProperty |
Field Detail |
---|
static final java.lang.String COMMENT
Method Detail |
---|
java.lang.Object copyTo(java.lang.Object target)
null
is specified for the
target, a new instance will be created.
The entire state of the object will be copied, with a few exceptions. In particular, any observers registered will NOT be copied. In cases where this instance contains child DBObjects, new instances of those children will be created, and the state copied to them. The copy will thus contain its own unique state; after making the copy, changing one instance will not cause any changes to occur to the copy. The properties will be copied; however, copies will not be made of the values referenced by the properties - thus, the copy will refer to the same instance as the original. Child objects that are copied will still point to the original parent; it is the responsibility of a copied parent to update the parent of copies of its children point to the copy of itself.
If the object, or any child object has an ID set, the equivalent object in
the copy will be given a TemporaryObjectID that does not reference back
to the original object. See copyTo(DBObject, boolean)
for
details.
copyTo
in interface Copyable
target
- The object to copy to. If target is null
, a new
instance will be created, and the state will be copied to that object.
java.lang.ClassCastException
- if the target is not null and cannot
be downcast to the type represented by this object.copyTo(DBObject, boolean)
DBObject copyTo(DBObject target, boolean temporaryCopy)
null
is specified for the target, a new instance will be created.
The entire state of the object will be copied. In cases where this instance contains child DBObjects, new instances of those children will be created, and the state copied to them. The copy will thus contain its own unique state; after making the copy, changing one instance will not cause any changes to occur to the copy. The properties will be copied; however, copies will not be made of the values referenced by the properties - thus, the copy will refer to the same instance as the original.
The includeID parameter governs what happens to any ids (on this object, or on any children). If true a TemporaryObjectID will be assigned to the copy of any DBObject, that points back to the original object. If false a TemporaryObjectID will be assigned to the copy of any DBObject that already has an ID, but it will not point back to the original.
target
- The object to copy to. If target is null
, a new
instance will be created, and the state will be copied to that object.temporaryCopy
- Whether to include a TemporaryObjectID that points
back to the original for every object.
java.lang.ClassCastException
- if the target is not null and cannot
be downcast to the type represented by this object.TemporaryObjectID
,
copyTo(java.lang.Object)
DBObject copyTo(DBObject target, IDPolicy idPolicy)
null
is specified for the target, a new instance will be created.
The entire state of the object will be copied. In cases where this instance contains child DBObjects, new instances of those children will be created, and the state copied to them. The copy will thus contain its own unique state; after making the copy, changing one instance will not cause any changes to occur to the copy. The properties will be copied; however, copies will not be made of the values referenced by the properties - thus, the copy will refer to the same instance as the original.
The idPolicy is used to control the IDs set on all objects in the copy.
target
- The object to copy to. If target is null
, a new
instance will be created, and the state will be copied to that object.idPolicy
- The policy for the IDs set in the copy.
java.lang.ClassCastException
- if the target is not null and cannot
be downcast to the type represented by this object.TemporaryObjectID
,
copyTo(java.lang.Object)
,
copyTo(DBObject, boolean)
void setName(java.lang.String name)
name
- a string containing the new name for this object.java.lang.String getName()
DBObjectID getID()
void setID(DBObjectID id)
id
- the DBObjectID to be associated with this object
java.lang.IllegalStateException
- if the ID is already setjava.lang.String getType()
DBObject[] getOwnedObjects()
DBObject[] getOwnedObjects(java.lang.String... type)
types
- the DBObject type(s) for the children to be returned
(e.g. Column.TYPE
)DBObject findOwnedObject(java.lang.String type, java.lang.String name)
type
- the DBObject type for the child to be returned
(e.g. Column.TYPE
)name
- the name of the DBObject to be returned
DBObject findOwnedObject(DBObjectID id)
The method does not recurse to look for children of children.
id
- the id to look for
DBObject getParent()
DBObjectID[] getReferenceIDs()
Will not return null.
boolean replaceReferenceIDs(java.util.Map<DBObjectID,DBObjectID> oldToNew)
oldToNew
- key = old DBObjectID, value = new DBObjectID
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |