DSHandler

public abstract class DSHandler extends SystemComponent

The class DSHandler provides abstract interface for getting the actual DAO from the implementation class. Creation Date: 3/10/2006. V1.0.2 - support DVO Caching

Author:Twinsen Tsang

Fields

cacher

protected DVOCacher cacher

The DVO cache.

dao

protected DAO dao

The singleton dao.

isCacheEnable

protected boolean isCacheEnable

The flag indicating whether the cache is enabled ?.

Methods

clearCache

public abstract void clearCache(DVO dvo)

Clear the cache ONLY by a particular dvo object;

getDAOInstance

public DAO getDAOInstance()

The public interface used for other class to access DAO.

Returns:Get the DAO singleton instance.

getInstance

protected abstract DAO getInstance()

Create / Get the instance of DAO.

init

protected void init()

Invoked for initialization. There is following parameters that can be set in this component:

  1. cache-enable: The flag whether the cache should be enabled. [Boolean]
  2. cache-size : The size of cache that can hold without LRU swapping. [Integer]