|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.persist.AbstractStorage
com.sibvisions.rad.persist.AbstractCachedStorage
public abstract class AbstractCachedStorage
The AbstractCachedStorage implemtns the caching mechanism of ICachedStorage. It
is the abstract base class for storages with standard meta data caching.
| Constructor Summary | |
|---|---|
AbstractCachedStorage()
Creates a new instance of AbstractCachedStorage. |
|
| Method Summary | |
|---|---|
static void |
clearMetaData()
Clears the meta data cache. |
static void |
clearMetaData(String pApplicationName)
Clears the meta data cache for the given application. |
static Hashtable<String,MetaData> |
getMetaData(String pGroup)
Gets meta data which are cached under a specific name. |
MetaData |
getMetaData(String pGroup,
String pName)
Returns the meta data for this AbstractStorage from the storage as MetaData and places
the MetaData to the cache with a group name and meta data name. |
MetaDataCacheOption |
getMetaDataCacheOption()
Gets the metadata cache option for this instance. |
Hashtable<String,MetaData> |
getMetaDataFromCache(String pGroup)
Returns all available meta data from the cache for a specific cache group. |
protected MetaData |
getMetaDataFromCache(String pGroup,
String pName)
Gets meta data from the cache. |
static boolean |
isGlobalMetaDataCacheEnabled()
Gets whether the global meta data cache is enabled. |
protected boolean |
isMetaDataCacheEnabled()
Gets whether the meta data cache should be used. |
protected void |
putMetaDataToCache(String pGroup,
String pName,
MetaData pMetaData)
Puts meta data to the cache. |
static boolean |
removeMetaData(String pGroup)
Removes all metadata for the given group. |
static void |
setGlobalMetaDataCacheEnabled(boolean pEnabled)
Sets the global meta data cache en-/disabled. |
void |
setMetaDataCacheOption(MetaDataCacheOption pOption)
Sets the metadata cache option for this instance. |
| Methods inherited from class com.sibvisions.rad.persist.AbstractStorage |
|---|
createBean, createBeanType, createCSV, createCSV, createCSV, createEmptyBean, createPOJO, createPOJO, debug, delete, delete, error, eventAfterDelete, eventAfterInsert, eventAfterUpdate, eventBeforeDelete, eventBeforeInsert, eventBeforeUpdate, eventCalculateRow, executeDelete, executeDeleteAsBean, executeFetch, executeFetchAsBean, executeGetMetaData, executeInsert, executeInsertAsBean, executeRefetchRow, executeRefetchRowAsBean, executeUpdate, executeUpdateAsBean, fetch, fetch, fetch, fetchBean, fetchBean, getAndInitBeanType, getMetaData, getName, info, insert, insert, refetch, refetchRow, setName, setPropertyNameForColumn, update, update, updateBean, writeCSV |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.rad.persist.IStorage |
|---|
delete, fetch, getEstimatedRowCount, getMetaData, insert, refetchRow, update |
| Constructor Detail |
|---|
public AbstractCachedStorage()
AbstractCachedStorage. This constructor checks if the global metadata
cache option is en- or disabled.
| Method Detail |
|---|
public MetaData getMetaData(String pGroup,
String pName)
throws DataSourceException
MetaData and places
the MetaData to the cache with a group name and meta data name.
getMetaData in interface ICachedStoragepGroup - the cache group namepName - the name for the meta data in the cache group
MetaData.
DataSourceException - if an Exception occur during getting the meta data from the storagepublic Hashtable<String,MetaData> getMetaDataFromCache(String pGroup)
getMetaDataFromCache in interface ICachedStoragepGroup - the cache group name
Hashtable with the name of the meta data in the cache group and the meta data as value
protected void putMetaDataToCache(String pGroup,
String pName,
MetaData pMetaData)
pGroup - the group name e.g. the life-cycle namepName - the name in the grouppMetaData - the meta data to cache
protected MetaData getMetaDataFromCache(String pGroup,
String pName)
pGroup - the group name e.g. the life-cycle namepName - the name in the group
null if meta data are not cachedpublic static Hashtable<String,MetaData> getMetaData(String pGroup)
pGroup - the cache name
null if there are no meta data with the namepublic static boolean removeMetaData(String pGroup)
pGroup - the group name
true if metadata were removed, false otherwisepublic static void clearMetaData()
public static void clearMetaData(String pApplicationName)
pApplicationName - the application namepublic static void setGlobalMetaDataCacheEnabled(boolean pEnabled)
pEnabled - true to enable meta data cache, false otherwisepublic static boolean isGlobalMetaDataCacheEnabled()
true if meta data cache is enabled, false otherwisepublic void setMetaDataCacheOption(MetaDataCacheOption pOption)
pOption - the metadata cache optionisMetaDataCacheEnabled()public MetaDataCacheOption getMetaDataCacheOption()
setMetaDataCacheOption(MetaDataCacheOption)protected boolean isMetaDataCacheEnabled()
true when the metadata cache should be used. This means that
either the instance cache option is MetaDataCacheOption.On, the session cache option is MetaDataCacheOption.On
or the cache options are set to MetaDataCacheOption.Default and the global meta data cache is
enabled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||