javax.rad.persist
Interface ICachedStorage

All Superinterfaces:
IStorage
All Known Implementing Classes:
DBStorage

public interface ICachedStorage
extends IStorage

The ICachedStorage extends the IStorage with meta data caching features. The meta data of storages doesn't change in production mode, so we will use a caching mechanism.


Method Summary
 List<Object[]> fetch(String pGroup, String pName, ICondition pFilter, SortDefinition pSort, int pFromRow, int pMinimumRowCount)
          Returns the requested rows as List[Object[]].
 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.
 Hashtable<String,MetaData> getMetaDataFromCache(String pGroup)
          Returns all available meta data from the cache for a specific cache group.
 
Methods inherited from interface javax.rad.persist.IStorage
delete, fetch, getEstimatedRowCount, getMetaData, insert, refetchRow, update
 

Method Detail

getMetaData

MetaData getMetaData(String pGroup,
                     String pName)
                     throws DataSourceException
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.

Parameters:
pGroup - the cache group name
pName - the name for the meta data in the cache group
Returns:
the meta data for this AbstractStorage from the storage as MetaData.
Throws:
DataSourceException - if an Exception occur during getting the meta data from the storage

getMetaDataFromCache

Hashtable<String,MetaData> getMetaDataFromCache(String pGroup)
Returns all available meta data from the cache for a specific cache group.

Parameters:
pGroup - the cache group name
Returns:
a Hashtable with the name of the meta data in the cache group and the meta data as value

fetch

List<Object[]> fetch(String pGroup,
                     String pName,
                     ICondition pFilter,
                     SortDefinition pSort,
                     int pFromRow,
                     int pMinimumRowCount)
                     throws DataSourceException
Returns the requested rows as List[Object[]]. Optimization can also return more then the minimum row count. If possible all in a certain time.

Parameters:
pGroup - the cache group name
pName - the name for the meta data in the cache group
pFilter - the ICondition to use
pSort - the SortDefinition to use
pFromRow - the from row index to request from storage
pMinimumRowCount - the minimum row count to request, beginning from the pFromRow.
Returns:
the requested rows as List[Object[]].
Throws:
DataSourceException - if an Exception occur during interacting with the storage.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.