Package com.spun.util.database
Interface DatabaseCache<T extends DatabaseObject>
- All Known Implementing Classes:
DatabaseLoader,TemporaryCache
public interface DatabaseCache<T extends DatabaseObject>
-
Method Summary
Modifier and Type Method Description Tget(int pkey)Class<T>getObjectType()The type of object this cache holds.booleanisLinkBackOn()The default LinkBack settingvoidload(Statement stmt)loads the cache from the databasevoidreset(Statement stmt)clears the cache and reloads it from the database
-
Method Details
-
getObjectType
The type of object this cache holds. Caches should only hold 1 type of DatabaseObject -
isLinkBackOn
boolean isLinkBackOn()The default LinkBack setting -
load
loads the cache from the database- Throws:
SQLException
-
reset
clears the cache and reloads it from the database- Throws:
SQLException
-
get
- Returns:
- the object from the cache with the corresponding pkey
-