|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.is.jrf.AbstractDomain | +--com.is.jrf.AbstractStaticDomain
This abstract superclass caches the PersistentObjects for it's subclasses. Subclasses of this abstract class should represent relatively small lookup tables that rarely or never change. i.e. a Gender table with two rows. One row for male, and one for female. The resulting PersistentObjects are cached so that calls to find() or findAll() return the cached instances instead. The cache uses a ThreadLocal instance so this should be able to be used in a multi-threaded environment where the threads are pooled. If the threads are not pooled then using this superclass may not benefit the performance of the application much. In a single-threaded environment this will work fine too.
Inner classes inherited from class com.is.jrf.AbstractDomain |
AbstractDomain.RowHandler |
Fields inherited from interface com.is.jrf.JRFConstants |
CURRENT_DATE, CURRENT_TIMESTAMP, DEFAULT_TO_EMPTY_STRING, DEFAULT_TO_FALSE, DEFAULT_TO_NOW, DEFAULT_TO_NULL, DEFAULT_TO_ONE, DEFAULT_TO_TODAY, DEFAULT_TO_TRUE, DEFAULT_TO_ZERO, EQUALS, NATURAL_PRIMARY_KEY, NO_POST_FIND, NOT_EQUALS, OPTIMISTIC_LOCK, REQUIRED, SEQUENCED_PRIMARY_KEY, SUBTYPE_IDENTIFIER, UNIQUE |
Constructor Summary | |
AbstractStaticDomain()
|
|
AbstractStaticDomain(int option)
|
Method Summary | |
PersistentObject |
find(java.lang.Object pkOrPO,
JDBCHelper aJDBCHelper)
This is a method override that gets its objects from the cache. |
java.util.List |
findAll(JDBCHelper aJDBCHelper)
Return all of the instances that are in the cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractStaticDomain()
public AbstractStaticDomain(int option)
Method Detail |
public PersistentObject find(java.lang.Object pkOrPO, JDBCHelper aJDBCHelper)
find
in class AbstractDomain
pkOrPO
- a value of type 'Object'aJDBCHelper
- a value of type 'JDBCHelper' - not used but needed
to match the signature of the overridden method.public java.util.List findAll(JDBCHelper aJDBCHelper)
findAll
in class AbstractDomain
aJDBCHelper
- a value of type 'JDBCHelper'
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |