Package com.spun.util.database
Class TemporaryCache<T extends DatabaseObject>
java.lang.Object
com.spun.util.database.TemporaryCache<T>
- All Implemented Interfaces:
DatabaseCache<T>
public class TemporaryCache<T extends DatabaseObject> extends Object implements DatabaseCache<T>
-
Constructor Summary
Constructors Constructor Description TemporaryCache(T object)TemporaryCache(T[] objects)TemporaryCache(T[] objects, boolean linkBack)TemporaryCache(T object, boolean linkBack) -
Method Summary
Modifier and Type Method Description voidforceGenericObjectType()Tget(int pkey)Class<T>getObjectType()The type of object this cache holds.booleanisLinkBackOn()The default LinkBack settingvoidload(Statement stmt)loads the chache from the databasevoidreset(Statement stmt)clears the cache and reloads it from the database
-
Constructor Details
-
TemporaryCache
-
TemporaryCache
-
TemporaryCache
-
TemporaryCache
-
-
Method Details
-
forceGenericObjectType
public void forceGenericObjectType() -
getObjectType
Description copied from interface:DatabaseCacheThe type of object this cache holds. Caches should only hold 1 type of DatabaseObject- Specified by:
getObjectTypein interfaceDatabaseCache<T extends DatabaseObject>
-
isLinkBackOn
public boolean isLinkBackOn()Description copied from interface:DatabaseCacheThe default LinkBack setting- Specified by:
isLinkBackOnin interfaceDatabaseCache<T extends DatabaseObject>
-
load
loads the chache from the database- Specified by:
loadin interfaceDatabaseCache<T extends DatabaseObject>- Throws:
SQLException
-
reset
clears the cache and reloads it from the database- Specified by:
resetin interfaceDatabaseCache<T extends DatabaseObject>- Throws:
SQLException
-
get
- Specified by:
getin interfaceDatabaseCache<T extends DatabaseObject>- Returns:
- the object from the cache with the corosponding pkey
-