|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.CascadeManager
public abstract class CascadeManager
Provides facilities for listing references between DBObjects in a DBObjectProvider, and provides cascade logic for cascading delete of an object.
The cascade manager interface supports the concept of "unresolved references" which are references in the model that don't resolve to a real object.
DBObjectProvider.getCascadeManager()
Nested Class Summary | |
---|---|
static class |
CascadeManager.NoCascadeRequiredException Exception thrown when a cascade is requested for an object that has no referers. |
Constructor Summary | |
---|---|
protected |
CascadeManager(DBObjectProvider pro) |
Method Summary | |
---|---|
SystemObject |
cascadeDelete(DBObject deleted, SystemObject referer) Cascades the delete of the given object to the given referer by taking a copy of the referer and performing any necessary updates. |
SystemObject |
cascadeDelete(DBObject deleted, SystemObject referer, boolean copyIfCascadeRequired) Cascades the delete of the given object to the given referer by taking a copy of the referer and performing any necessary updates. |
void |
doCascadeDelete(SystemObject deleted, SystemObject referer) |
protected DBObjectProvider |
getProvider() |
boolean |
isUnresolvedReference(DBObjectID id) Returns true if the given id is an "unresolved reference". |
java.util.Collection<SystemObject> |
listReferencedObjects(SystemObject obj, boolean recurse) Returns the SystemObjects that this SystemObject, or any of its children, are dependent on (reference). |
abstract java.util.Collection<DBObjectID> |
listReferers(DBObject obj) Gets the ids of the DBObjects who directly reference the given object. |
abstract java.util.Collection<DBObjectID> |
listTopLevelReferers(SystemObject obj, boolean deep) Gets the ids for the SystemObjects who reference (either directly or via their children) the given SystemObject (or one of its children). |
java.util.Collection<Difference> |
resolveUnresolvedReferences(SystemObject obj) If this manager supports unresolved references and the given object could potentially fix those references then this method finds any objects that have an unresolved reference and looks to resolve it. |
protected void |
updateObjects(java.util.List<SystemObject> originals, java.util.List<SystemObject> updates, boolean bulkOperation) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CascadeManager(DBObjectProvider pro)
Method Detail |
---|
protected DBObjectProvider getProvider()
public abstract java.util.Collection<DBObjectID> listReferers(DBObject obj)
obj
- the object being referenced (e.g. a PK)public abstract java.util.Collection<DBObjectID> listTopLevelReferers(SystemObject obj, boolean deep)
For example for a Table this would return any Tables, Views or Synonyms (etc) that reference it via FKs, ColumnUsages or Object references).
The referers will not contain the given object, even if it has internal references (e.g. a PK referencing its own Columns). The references are all external.
obj
- the object to search for references todeep
- whether to traverse references to the referers etc.public SystemObject cascadeDelete(DBObject deleted, SystemObject referer) throws CascadeManager.NoCascadeRequiredException
deleted
- the object that's being deleted. if this is not a SystemObject, it must still be currently parented by its SystemObject.referer
- the object that we want to cascade the delete toCascadeManager.NoCascadeRequiredException
- if there is nothing to cascade and no changes are required.public SystemObject cascadeDelete(DBObject deleted, SystemObject referer, boolean copyIfCascadeRequired) throws CascadeManager.NoCascadeRequiredException
deleted
- the object that's being deleted. if this is not a SystemObject, it must still be currently parented by its SystemObject.referer
- the object that we want to cascade the delete toif
- there is a change to cascade, optionally take a copy of referer and make the changes to that, or make them to the referer object directly.CascadeManager.NoCascadeRequiredException
- if there is nothing to cascade and no changes are required.protected void updateObjects(java.util.List<SystemObject> originals, java.util.List<SystemObject> updates, boolean bulkOperation) throws DBException
DBException
public void doCascadeDelete(SystemObject deleted, SystemObject referer) throws DBException
DBException
public java.util.Collection<SystemObject> listReferencedObjects(SystemObject obj, boolean recurse)
public boolean isUnresolvedReference(DBObjectID id)
#supportsUnresolvedReferences()
public java.util.Collection<Difference> resolveUnresolvedReferences(SystemObject obj)
obj
- the object that is being created and could potentially resolve unresolved references.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |