Class CachedSQLWrapper

All Implemented Interfaces:
IPersistence, ISQLWrapper, AbstractDataObject, ICBLBeanNGroup, ICBLContainer, IFieldContainer, ISMBean, ISMDataType

public abstract class CachedSQLWrapper extends SQLWrapper
Cached table is for Reference Data only. Reference data are NOT written back to the database, only read. They are read from database - (when open() method is called) - and loaded into memory.
This is useful for load large amounts of static data which either needs to be accessed by different programs (only 1 copy will be cached), or if the application can be started from an Application-Server, and hence the data will stay in memory whilst AppServer is alive.
To use - find a persistent class which inherits from SQLWrapper or AbstractORContainer , and change its superclass to CachedSQLWrapper.
NOTE: the amount of data cached can be limited by applying additional sql statement via,
  record.assignSQLConditions("EVENT_DATE > 2000" );
  record.open(IPersistence.OPEN_MODE_INPUT);
 
Also, the design only works for searching for KEY EQUALS OR GT TO VALUE
Example
   MyCachedSQLWrapper instance = new MyCachedSQLWrapper();
   instance.open(IPersistence.OPEN_MODE_INPUT); // generates SQL, reads and caches the values
   instance.setIDKey( 123 );  // assuming the SQL Table has field ID defined as a key 
   instance.seekRecord( cachedAcct.getObjectIDKey()); // search the cache for the ID (value 123) - automatically populate fields in instance
   instance.close();   // release cache memory