Package com.spun.util.database
Class TemporaryCache<T extends DatabaseObject>
java.lang.Object
com.spun.util.database.TemporaryCache<T>
- All Implemented Interfaces:
DatabaseCache<T>
-
Constructor Summary
ConstructorsConstructorDescriptionTemporaryCache(T object) TemporaryCache(T[] objects) TemporaryCache(T[] objects, boolean linkBack) TemporaryCache(T object, boolean linkBack) -
Method Summary
Modifier and TypeMethodDescriptionvoidget(int pkey) The type of object this cache holds.booleanThe default LinkBack settingvoidloads the chache from the databasevoidclears 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>
-
reset
clears the cache and reloads it from the database- Specified by:
resetin interfaceDatabaseCache<T extends DatabaseObject>
-
get
- Specified by:
getin interfaceDatabaseCache<T extends DatabaseObject>- Returns:
- the object from the cache with the corosponding pkey
-