|
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.SchemaObjectManager
public class SchemaObjectManager
Manager class which caches SchemaObjects and maintains dependency links
between them. For example: registering tables will allow the query of any
table that is referenced by a FK from another table.
This uses the getOwnedObjects() and getReferenceIDs() methods on DBObject.
Constructor Summary | |
---|---|
SchemaObjectManager(DBObjectProvider provider)
|
Method Summary | |
---|---|
SchemaObject |
cascadeDelete(DBObject deleted,
SchemaObject referer)
Cascades the delete of the given object to the given referer by taking a copy of the referer and performing any necessary updates. |
SchemaObject |
cascadeDelete(DBObject deleted,
SchemaObject 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. |
protected void |
checkInit()
|
protected void |
clearAllCaches()
|
protected boolean |
couldFixUnresolvedReferences(DBObject obj)
If the provider supports unresolved references this method must return for an object that could resolve them. |
void |
doCascadeDelete(SchemaObject deleted,
SchemaObject referer)
|
static SchemaObject[] |
getDependencies(SchemaObject obj,
DBObjectProvider pro,
boolean recurse)
Returns the SchemaObjects that this SchemaObject, or any of its children, are dependent on. |
protected DBObjectProvider |
getProvider()
|
DBObjectID[] |
getReferers(DBObject obj)
Returns the DBObjects who directly reference the given DBObject. |
DBObjectID[] |
getSchemaObjectReferers(SchemaObject obj,
boolean deep)
Returns the SchemaObjects who reference (either directly or via their children) the given SchemaObject (or one of its children). |
boolean |
hasUnresolvedReference(SchemaObject obj,
java.lang.String refType)
Returns true if the given schema object (or any of its children) has an unresolved reference to an object of the given type. |
protected boolean |
haveRegisteredAll()
|
boolean |
isUnresolvedReference(DBObjectID id)
Returns true if the given id is an "unresolved reference". |
protected java.lang.String[] |
listObjectTypes()
|
protected Schema[] |
listSchemas()
|
protected boolean |
needsInitialization(SchemaObject obj)
Returns true if the given schema object isn't built yet (i.e. |
protected void |
registerAllObjects()
Registers all objects in the underlying DBObjectProvider with this manager. |
void |
registerObject(SchemaObject obj)
Register the given SchemaObject with this manager. |
void |
registerObject(SchemaObject obj,
boolean loadOnly)
Registers an object on the understanding that this is a load of the object, not a create or update. |
protected boolean |
resolvesUnresolvedReference(DBObjectID id,
DBObjectID unresolved)
Returns true if the given id resolves the given id that is unresolved. |
protected void |
setRegisterProgress(int objN,
int objT,
int schemaN,
int schemaT,
java.lang.String schemaName)
|
protected boolean |
shouldRegister(SchemaObject obj,
boolean loadOnly)
Online we register objects as they are loaded because all we care about is keeping our cache up-to-date (i.e. |
protected boolean |
supportsUnresolvedReferences()
Returns true if this manager supports its objects having unresolved references. |
void |
unregisterObject(SchemaObject obj)
Unregisters the given object from the object manager. |
protected void |
updateObjects(java.util.List<SchemaObject> originals,
java.util.List<SchemaObject> updates,
boolean bulkOperation)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaObjectManager(DBObjectProvider provider)
Method Detail |
---|
protected final DBObjectProvider getProvider()
protected final boolean haveRegisteredAll()
protected void clearAllCaches()
protected boolean supportsUnresolvedReferences()
protected boolean couldFixUnresolvedReferences(DBObject obj)
public boolean isUnresolvedReference(DBObjectID id)
supportsUnresolvedReferences()
protected boolean resolvesUnresolvedReference(DBObjectID id, DBObjectID unresolved)
supportsUnresolvedReferences()
public void registerObject(SchemaObject obj)
public void registerObject(SchemaObject obj, boolean loadOnly)
registerObject(SchemaObject)
protected boolean shouldRegister(SchemaObject obj, boolean loadOnly)
protected final boolean needsInitialization(SchemaObject obj)
public void unregisterObject(SchemaObject obj)
public DBObjectID[] getSchemaObjectReferers(SchemaObject obj, boolean deep)
obj
- the object to search for references todeep
- whether to traverse references to the referers etc.public DBObjectID[] getReferers(DBObject obj)
public boolean hasUnresolvedReference(SchemaObject obj, java.lang.String refType)
protected void updateObjects(java.util.List<SchemaObject> originals, java.util.List<SchemaObject> updates, boolean bulkOperation) throws DBException
DBException
public void doCascadeDelete(SchemaObject deleted, SchemaObject referer) throws DBException
DBException
public SchemaObject cascadeDelete(DBObject deleted, SchemaObject referer)
deleted
- the object that's being deleted. if this is not a
SchemaObject, it must still be currently parented by its SchemaObject.referer
- the object that we want to cascade the delete to
public SchemaObject cascadeDelete(DBObject deleted, SchemaObject referer, boolean copyIfCascadeRequired)
deleted
- the object that's being deleted. if this is not a
SchemaObject, it must still be currently parented by its SchemaObject.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.
protected void checkInit()
protected final void registerAllObjects()
protected java.lang.String[] listObjectTypes()
protected Schema[] listSchemas() throws DBException
DBException
protected void setRegisterProgress(int objN, int objT, int schemaN, int schemaT, java.lang.String schemaName)
public static final SchemaObject[] getDependencies(SchemaObject obj, DBObjectProvider pro, boolean recurse)
|
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 |