|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsystemic.sif.sbpframework.persist.dao.BaseDAO
systemic.sif.sbpframework.persist.dao.DOCacheDAO
public class DOCacheDAO
Constructor Summary | |
---|---|
DOCacheDAO()
|
Method Summary | |
---|---|
java.util.Set<DOCObject> |
getAlreadyCachedDependentObjects(java.lang.String sifObjectName,
java.lang.String flatKey,
java.lang.String applicationId,
java.lang.String zoneId)
This method returns a list of dependent objects that have already been cached for a given SIF Object. |
DOCObject |
getCachedDependentObject(DOCObject objectToTest)
This method checks if the 'objectToTest' has already been cached for a requested. |
java.util.List<DOCache> |
getExpiredObjects(java.lang.String applicationId,
java.lang.String agentId)
This method returns all objects in the cache that have remaining dependencies but have an expiry date older than the current date and time. |
java.util.List<DOCObject> |
getNotYetRequestedObjects(java.lang.String sifObjectName,
java.lang.String applicationId,
java.lang.String zoneId)
This method returns a list of DOC Objects. |
java.util.List<DOCache> |
getObjectsWithoutDependencies(java.lang.String sifObjectName,
java.lang.String applicationId,
java.lang.String agentId)
This method gets all cached objects of a given type for a particular application and agent that have no remaining dependencies. |
void |
removeCachedObject(DOCache cacheObject)
This method removes the given object and all its dependencies from the cache. |
void |
removeDependency(DOCObject docObject)
This method removes the docObject from the DO cache. |
void |
removeDependentObject(DOCObject docObject)
This method removes the given cached dependent object. |
DOCObject |
retrieve(DOCObject docObject)
|
DOCache |
retrieveCachedObject(java.lang.String sifObjectName,
java.lang.String flatKey,
java.lang.String applicationId,
java.lang.String zoneId,
boolean loadAll)
This method attempts to retrieve a cached SIF Object based on the object name, object key (flatten key) and the agentId. |
void |
save(DOCache cacheObject)
This method saves the given object to the DB. |
void |
save(DOCObject docObject)
This method saves the given object to the DB. |
Methods inherited from class systemic.sif.sbpframework.persist.dao.BaseDAO |
---|
getCurrentSession, loadSubObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOCacheDAO()
Method Detail |
---|
public DOCache retrieveCachedObject(java.lang.String sifObjectName, java.lang.String flatKey, java.lang.String applicationId, java.lang.String zoneId, boolean loadAll) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
sifObjectName
- the name of the SIF Object for which the cached object info shall be returned.flatKey
- A flattened key of the cached object that makes this object unique.applicationId
- The application ID for which the cached object shall be returned.zoneId
- The zone ID for which the cached object shall be returned.loadAll
- TRUE=>Load all children elements (lazy loading forced). FALSE no children objects are loaded.
IllegalArgumentException:
- Any of the arguments is null.
PersistenceException:
- There is an issue with the underlying database. An error is logged.
java.lang.IllegalArgumentException
javax.persistence.PersistenceException
public void save(DOCache cacheObject) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
cacheObject
- The object to save to the cache.
java.lang.IllegalArgumentException
- cacheObject parameter is null.
javax.persistence.PersistenceException
- A database error occurred.public void save(DOCObject docObject) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
docObject
- The object to save to the cache.
java.lang.IllegalArgumentException
- cacheObject parameter is null.
javax.persistence.PersistenceException
- A database error occurred.public DOCObject getCachedDependentObject(DOCObject objectToTest) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
objectToTest
- The object to find in the DOC.
java.lang.IllegalArgumentException
- objectToTest is null or any of the properties listed above is empty or null.
javax.persistence.PersistenceException
- A database error occurred.public java.util.Set<DOCObject> getAlreadyCachedDependentObjects(java.lang.String sifObjectName, java.lang.String flatKey, java.lang.String applicationId, java.lang.String zoneId) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
sifObjectName
- The object name for which the dependent object list with already cached objects shall be returned.flatKey
- The key of the above object.applicationId
- The application Id for which the object is registered in the cache.zoneId
- The zone Id for which the object is registered in the cache.
IllegalArgumentException:
- Any of the arguments is null.
PersistenceException:
- There is an issue with the underlying database. An error is logged.
java.lang.IllegalArgumentException
javax.persistence.PersistenceException
public void removeDependency(DOCObject docObject) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
docObject
- The object for which the dependencies shall be returned.
java.lang.IllegalArgumentException
- docObject is null or any of the properties listed above is empty or null.
javax.persistence.PersistenceException
- A database error occurred.public java.util.List<DOCObject> getNotYetRequestedObjects(java.lang.String sifObjectName, java.lang.String applicationId, java.lang.String zoneId) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
sifObjectName
- The SIF Object names to search for (i.e StudentPersonal)applicationId
- Only return objects marked for this application.zoneId
- Only return objects marked for this zone.
java.lang.IllegalArgumentException
- Any of the parameters is null or empty.
javax.persistence.PersistenceException
- A database error occurred.public java.util.List<DOCache> getObjectsWithoutDependencies(java.lang.String sifObjectName, java.lang.String applicationId, java.lang.String agentId) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
sifObjectName
- The type of cached objects to be returned.applicationId
- The application for which the objects shall be returned.agentId
- The agent for which to get the object list.
java.lang.IllegalArgumentException
- Any of the parameters is null or empty.
javax.persistence.PersistenceException
- A database error occurred. Error is logged.public java.util.List<DOCache> getExpiredObjects(java.lang.String applicationId, java.lang.String agentId) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
applicationId
- Only return expired objects for this application.agentId
- Only return expired object that were initially cached by this agent.
java.lang.IllegalArgumentException
- Any of the parameters is null or empty.
javax.persistence.PersistenceException
- A database error occurred. Error is logged.public void removeDependentObject(DOCObject docObject) throws javax.persistence.PersistenceException
docObject
- The object to remove from the DOC_OBJECT table.
javax.persistence.PersistenceException
- A database error occurred.public void removeCachedObject(DOCache cacheObject) throws javax.persistence.PersistenceException
cacheObject
- The object to remove from the DO Cache.
javax.persistence.PersistenceException
- A database error occurred.public DOCObject retrieve(DOCObject docObject) throws java.lang.IllegalArgumentException, javax.persistence.PersistenceException
java.lang.IllegalArgumentException
javax.persistence.PersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |