|
Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
PUBLIC:
IdentityMapAccessor provides the public interface into all functionality associated with
TopLink identity maps.
As appropriate IdentityMapAccessor can be obtained from a session with it's getIdentityMapAccessor()
method.
Methods that used to be called on the Session to access identity maps can now be called
through the IdentityMapAccessor.
For instance, to initialize identity maps the code used to be:
session.initializeIdentityIdentityMaps()
The code now is:
session.getIdentityMapAccessor().initializeIdentityMaps()
Session| Method Summary | |
void |
clearQueryCache()
ADVANCED: Clear all the query caches |
void |
clearQueryCache(ReadQuery query)
ADVANCED: Clear the query class associated with the passed-in read query |
void |
clearQueryCache(java.lang.String sessionQueryName)
ADVANCED: Clear the query cache associated with the named query on the session |
void |
clearQueryCache(java.lang.String descriptorQueryName,
java.lang.Class queryClass)
ADVANCED: Clear the query cache associated with the named query on the descriptor for the given class |
boolean |
containsObjectInIdentityMap(java.lang.Object domainObject)
ADVANCED: Return if there is an object for the primary key. |
boolean |
containsObjectInIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED: Return if there is an object for the row containing primary key and the class. |
boolean |
containsObjectInIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
ADVANCED: Return if there is an object for the primary key. |
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
ADVANCED: Query the cache in-memory. |
java.util.Vector |
getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean shouldReturnInvalidatedObjects)
ADVANCED: Query the cache in-memory. |
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow)
ADVANCED: Query the cache in-memory. |
java.lang.Object |
getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
ADVANCED: Query the cache in-memory. |
java.lang.Object |
getFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Return the object from the identity with primary and class of the given object. |
java.lang.Object |
getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED: Return the object from the identity with the primary and class. |
java.lang.Object |
getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
ADVANCED: Return the object from the identity with the primary and class. |
java.lang.Object |
getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
ADVANCED: Return the object from the identity with the primary and class. |
java.lang.Object |
getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
ADVANCED: Return the object from the identity with the primary and class. |
long |
getRemainingValidTime(java.lang.Object object)
ADVANCED: Return the remaining life of this object. |
java.lang.Object |
getWriteLockValue(java.lang.Object domainObject)
ADVANCED: Extract the write lock value from the identity map. |
java.lang.Object |
getWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass)
ADVANCED: Extract the write lock value from the identity map. |
void |
initializeAllIdentityMaps()
PUBLIC: Reset the entire object cache. |
void |
initializeIdentityMap(java.lang.Class theClass)
PUBLIC: Reset the identity map for only the instances of the class. |
void |
initializeIdentityMaps()
PUBLIC: Reset the entire local object cache. |
void |
invalidateAll()
ADVANCED: Set all of the objects for all classes to be invalid in TopLink's identity maps. |
void |
invalidateClass(java.lang.Class myClass)
ADVANCED: Set all of the objects of a specific class to be invalid in TopLink's identity maps Will set the recurse on inheritance to true. |
void |
invalidateClass(java.lang.Class myClass,
boolean recurse)
ADVANCED: Set all of the objects of a specific class to be invalid in TopLink's identity maps. |
void |
invalidateObject(java.lang.Object object)
ADVANCED: Set an object to be invalid in the TopLink identity maps. |
void |
invalidateObject(Record rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED: Set an object to be invalid in the TopLink identity maps. |
void |
invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass)
ADVANCED: Set an object to be invalid in the TopLink identity maps. |
void |
invalidateObjects(Expression selectionCriteria)
ADVANCED: Set all of the objects from the given Expression to be invalid in the TopLink Identity Maps |
void |
invalidateObjects(java.util.Vector collection)
ADVANCED: Set all of the objects in the given collection to be invalid in the TopLink Identity Maps This method will take no action for any objects in the collection that do not exist in the cache. |
boolean |
isValid(DatabaseRow rowContainingPrimaryKey,
java.lang.Class theClass)
ADVANCED: Return true if this object is valid in TopLink's identity maps return false otherwise |
boolean |
isValid(java.lang.Object object)
ADVANCED: Return true if this object is valid in TopLink's identity maps return false otherwise |
boolean |
isValid(java.util.Vector primaryKey,
java.lang.Class theClass)
ADVANCED: Return true if this object is valid in TopLink's identity maps return false otherwise |
void |
printIdentityMap(java.lang.Class businessClass)
PUBLIC: Used to print all the objects in the identity map of the passed in class. |
void |
printIdentityMapLocks()
PUBLIC: Used to print all the locks in every identity map in this session. |
void |
printIdentityMaps()
PUBLIC: Used to print all the objects in every identity map in this session. |
java.lang.Object |
putInIdentityMap(java.lang.Object domainObject)
ADVANCED: Register the object with the identity map. |
java.lang.Object |
putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key)
ADVANCED: Register the object with the identity map. |
java.lang.Object |
putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key,
java.lang.Object writeLockValue)
ADVANCED: Register the object with the identity map. |
java.lang.Object |
putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key,
java.lang.Object writeLockValue,
long readTime)
ADVANCED: Register the object with the identity map. |
java.lang.Object |
removeFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Remove the object from the object cache. |
java.lang.Object |
removeFromIdentityMap(java.util.Vector key,
java.lang.Class theClass)
ADVANCED: Remove the object from the object cache. |
void |
updateWriteLockValue(java.lang.Object domainObject,
java.lang.Object writeLockValue)
ADVANCED: Update the write lock value in the identity map. |
void |
updateWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
ADVANCED: Update the write lock value in the identity map. |
void |
validateCache()
ADVANCED: This can be used to help debugging an object identity problem. |
| Method Detail |
public void clearQueryCache()
public void clearQueryCache(ReadQuery query)
public void clearQueryCache(java.lang.String sessionQueryName)
public void clearQueryCache(java.lang.String descriptorQueryName,
java.lang.Class queryClass)
public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean shouldReturnInvalidatedObjects)
throws QueryException
QueryException
public java.util.Vector getAllFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
throws QueryException
QueryExceptionpublic java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass)
public java.lang.Object getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass)
public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
public java.lang.Object getFromIdentityMap(Record rowContainingPrimaryKey,
java.lang.Class theClass,
boolean shouldReturnInvalidatedObjects)
public java.lang.Object getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow)
throws QueryException
QueryException
public java.lang.Object getFromIdentityMap(Expression selectionCriteria,
java.lang.Class theClass,
Record translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy)
throws QueryException
QueryExceptionpublic long getRemainingValidTime(java.lang.Object object)
public java.lang.Object getWriteLockValue(java.lang.Object domainObject)
public java.lang.Object getWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass)
public void initializeAllIdentityMaps()
NOTE: be careful using this method. This method blows away both this session's and its parents caches, this includes the server cache or any other cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.
public void initializeIdentityMap(java.lang.Class theClass)
public void initializeIdentityMaps()
public void invalidateObject(java.lang.Object object)
public void invalidateObject(java.util.Vector primaryKey,
java.lang.Class theClass)
public void invalidateObject(Record rowContainingPrimaryKey,
java.lang.Class theClass)
public void invalidateObjects(java.util.Vector collection)
public void invalidateObjects(Expression selectionCriteria)
public void invalidateAll()
public void invalidateClass(java.lang.Class myClass)
public void invalidateClass(java.lang.Class myClass,
boolean recurse)
public boolean isValid(java.lang.Object object)
public boolean isValid(java.util.Vector primaryKey,
java.lang.Class theClass)
public boolean isValid(DatabaseRow rowContainingPrimaryKey,
java.lang.Class theClass)
public void printIdentityMap(java.lang.Class businessClass)
public void printIdentityMaps()
public void printIdentityMapLocks()
public java.lang.Object putInIdentityMap(java.lang.Object domainObject)
public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key)
public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key,
java.lang.Object writeLockValue)
public java.lang.Object putInIdentityMap(java.lang.Object domainObject,
java.util.Vector key,
java.lang.Object writeLockValue,
long readTime)
public java.lang.Object removeFromIdentityMap(java.lang.Object domainObject)
public java.lang.Object removeFromIdentityMap(java.util.Vector key,
java.lang.Class theClass)
public void updateWriteLockValue(java.lang.Object domainObject,
java.lang.Object writeLockValue)
public void updateWriteLockValue(java.util.Vector primaryKey,
java.lang.Class theClass,
java.lang.Object writeLockValue)
public void validateCache()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||