|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.manager.AbstractBaseManager
This class contains common functionality of a Manager for instantiating OM's.
Field Summary | |
protected org.apache.jcs.access.GroupCacheAccess |
cache
used to cache the om objects. |
protected static org.apache.log4j.Category |
category
the log |
private java.lang.String |
className
|
private boolean |
isNew
|
protected java.util.Map |
listenersMap
|
protected MethodResultCache |
mrCache
method results cache |
private java.lang.Class |
omClass
the class that the service will instantiate |
private java.lang.String |
region
|
protected java.util.Map |
validFields
|
Constructor Summary | |
AbstractBaseManager()
|
Method Summary | |
void |
addCacheListenerImpl(CacheListener listener)
|
protected Persistent |
cacheGet(java.io.Serializable key)
|
protected void |
clearImpl()
|
private java.util.List |
createSubsetList(java.lang.String key)
|
java.lang.String |
getClassName()
Get the classname to instantiate for getInstance() |
MethodResultCache |
getMethodResultCache()
|
protected java.lang.Class |
getOMClass()
Get the Class instance |
protected Persistent |
getOMInstance()
Get a fresh instance of an om |
protected Persistent |
getOMInstance(ObjectKey id)
Return an instance of an om based on the id |
protected Persistent |
getOMInstance(ObjectKey key,
boolean fromCache)
Return an instance of an om based on the id |
protected java.util.List |
getOMs(java.util.List ids)
Gets a list of om's based on id's. |
protected java.util.List |
getOMs(java.util.List ids,
boolean fromCache)
Gets a list of om's based on id's. |
protected java.util.List |
getOMs(ObjectKey[] ids)
Gets a list of om's based on id's. |
java.lang.String |
getRegion()
Get the value of region. |
protected void |
notifyListeners(java.util.List listeners,
Persistent oldOm,
Persistent om)
|
protected Persistent |
putInstanceImpl(Persistent om)
|
protected Persistent |
putInstanceImpl(java.io.Serializable key,
Persistent om)
|
private void |
readObject(java.io.ObjectInputStream in)
Helper methods for the Serializable interface. |
protected void |
registerAsListener()
NoOp version. |
protected Persistent |
removeInstanceImpl(java.io.Serializable key)
|
protected abstract Persistent |
retrieveStoredOM(ObjectKey id)
|
protected abstract java.util.List |
retrieveStoredOMs(java.util.List ids)
|
void |
setClassName(java.lang.String v)
Set the classname to instantiate for getInstance() |
protected void |
setOMClass(java.lang.Class omClass)
Set the Class that will be instantiated by this manager |
void |
setRegion(java.lang.String v)
Set the value of region. |
private void |
writeObject(java.io.ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Category category
protected transient org.apache.jcs.access.GroupCacheAccess cache
protected MethodResultCache mrCache
private java.lang.Class omClass
private java.lang.String className
private java.lang.String region
private boolean isNew
protected java.util.Map validFields
protected java.util.Map listenersMap
Constructor Detail |
public AbstractBaseManager()
Method Detail |
protected java.lang.Class getOMClass()
protected void setOMClass(java.lang.Class omClass)
omClass
- the om classprotected Persistent getOMInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.IllegalAccessException
public java.lang.String getClassName()
public void setClassName(java.lang.String v) throws TorqueException
v
- Value to assign to className.
TorqueException
protected Persistent getOMInstance(ObjectKey id) throws TorqueException
id
-
TorqueException
protected Persistent getOMInstance(ObjectKey key, boolean fromCache) throws TorqueException
TorqueException
protected Persistent cacheGet(java.io.Serializable key)
protected void clearImpl() throws TorqueException
TorqueException
protected Persistent removeInstanceImpl(java.io.Serializable key) throws TorqueException
TorqueException
protected Persistent putInstanceImpl(Persistent om) throws TorqueException
TorqueException
protected Persistent putInstanceImpl(java.io.Serializable key, Persistent om) throws TorqueException
TorqueException
protected abstract Persistent retrieveStoredOM(ObjectKey id) throws TorqueException
TorqueException
protected java.util.List getOMs(ObjectKey[] ids) throws TorqueException
ids
- a ObjectKey[]
value
List
value
TorqueException
- if an error occursprotected java.util.List getOMs(java.util.List ids) throws TorqueException
ids
- a List
of ObjectKey
's
List
value
TorqueException
- if an error occursprotected java.util.List getOMs(java.util.List ids, boolean fromCache) throws TorqueException
ids
- a List
of ObjectKey
's
List
value
TorqueException
- if an error occursprotected abstract java.util.List retrieveStoredOMs(java.util.List ids) throws TorqueException
TorqueException
public java.lang.String getRegion()
public void setRegion(java.lang.String v) throws TorqueException
v
- Value to assign to region.
TorqueException
public MethodResultCache getMethodResultCache()
protected void registerAsListener()
public void addCacheListenerImpl(CacheListener listener)
listener
- A new listener for cache events.private java.util.List createSubsetList(java.lang.String key)
key
-
key
.protected void notifyListeners(java.util.List listeners, Persistent oldOm, Persistent om)
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
Serializable
interface.
in
- The stream to read a Serializable
from.
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |