Expresso 5-6

com.jcorporate.expresso.core.dbobj
Class CacheUtils

java.lang.Object
  extended bycom.jcorporate.expresso.core.dbobj.CacheUtils

public class CacheUtils
extends Object

Utility methods for putting a DBObject into a cache.

Author:
Michael Rimov

Constructor Summary
CacheUtils()
           
 
Method Summary
 void addToCache(DBObject theDBObj)
          When using basic caching, this method is used to add a new DB object to the cache, where it is later used when retrieveing data instead of going directly to the database.
 void addUnmodifiedToCache(DBObject theDBObj)
          Adds a non-modified object to the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheUtils

public CacheUtils()
Method Detail

addUnmodifiedToCache

public void addUnmodifiedToCache(DBObject theDBObj)
                          throws DBException
Adds a non-modified object to the cache. This is most often called after DataObject.retrieve(). No related cache notification will occur when this happens

Parameters:
theDBObj - the object to add to the cache.
Throws:
DBException - upon add error (either Cache related or dbobject related)

addToCache

public void addToCache(DBObject theDBObj)
                throws DBException
When using basic caching, this method is used to add a new DB object to the cache, where it is later used when retrieveing data instead of going directly to the database. This functionality can be controlled with the "dbCache" property in the properties file(s).

Parameters:
theDBObj - com.jcorporate.expresso.core.dbobj.DBObject The object to be cached
Throws:
DBException - upon add error (either Cache related or dbobject related)

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.