|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.IDPolicy
public abstract class IDPolicy
When a DBObject is copied, the copy can optionally use an IDPolicy. An IDPolicy is responsible for managing the IDs of the copied object. Some example policies subclasses are provided, for example:
IDPolicy.TemporaryIDPolicy
- the copy has a temporary object ID pointing back to the original.IDPolicy.SameIDPolicy
- the copy has the same ID as the original.IDPolicy.DefaultIDPolicy
- the copy is given a standalone temporary object ID (i.e. it doesn't have an original object set) if the original object had an ID (i.e. it could be being referenced.After a copy, the Map of original IDs to IDs in the copy is available from the policy.
Nested Class Summary | |
---|---|
static class |
IDPolicy.DefaultIDPolicy IDPolicy that creates a TemporaryObjectID that does NOT point back to the original object for every object that has an ID. |
static class |
IDPolicy.SameIDPolicy IDPolicy that simply copies the objects ID to the copy. |
static class |
IDPolicy.TemporaryIDPolicy IDPolicy that creates a TemporaryObjectID for every object that has the original object set. |
Constructor Summary | |
---|---|
IDPolicy() |
Method Summary | |
---|---|
protected void |
copyID(DBObject original, DBObject copy) The copyTo implementation on DBObject calls this method to create an ID for the copy, and set it. |
java.util.Map<DBObjectID,DBObjectID> |
getIDMap() Returns the mapping of original IDs to new IDs for the copy process. |
protected abstract DBObjectID |
getNewID(DBObject original, DBObject copy) Given the original object, the copy is given an ID depending on the policy. |
java.util.Map<DBObjectID,DBObjectID> |
getReverseIDMap() Returns the mapping of new IDs to the original object IDs for the copy process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDPolicy()
Method Detail |
---|
protected final void copyID(DBObject original, DBObject copy)
getNewID(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject)
to set the appropriate ID, and then maps the new ID internally.
This method cannot modify the underlying objects.
original
-copy
-protected abstract DBObjectID getNewID(DBObject original, DBObject copy)
This method cannot modify the underlying objects.
public final java.util.Map<DBObjectID,DBObjectID> getIDMap()
public final java.util.Map<DBObjectID,DBObjectID> getReverseIDMap()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |