|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bsf.listOfValues.util.LovDefinitionCache
This class is used to store the "lov definitions" (in a LovEntityCacheItem) to prevent the reexecution of a select statement to obtain the to be executed SQL statement defined in the corresponding LOV.
Note that this Class is used as a singleton and that the LovEntityCacheItem is never used outside of this cache.
(in this file as well)
Nested Class Summary | |
(package private) class |
LovDefinitionCache.LovEntityCacheItem
Stores the needed informations related to the LovBean (mainly the SQL statement). |
Field Summary | |
private java.util.HashMap |
_cache
Cache that holds the LovEntityCacheItems. |
private static LovDefinitionCache |
_lovCacheInstance
|
Constructor Summary | |
private |
LovDefinitionCache()
|
Method Summary | |
void |
addToCache(java.lang.Long p_lovOID,
java.lang.String p_lovName,
java.lang.String p_lovRequest,
java.util.List p_metaData)
Adds a new item to the cache (will use a LovEntityCacheItem to do so). |
static LovDefinitionCache |
getInstance()
Gives access to the singleton. |
java.lang.Long |
getLovOID(java.lang.String p_lovName)
Returns the LovOID corresponding to a given LovName or null if no match is found in the cache. |
java.lang.String |
getRequestForLovOID(java.lang.Long p_lovOID)
Returns the sql statement (or null if no match is found) stored in the LovDefinitionCache and corresponding to the Lov with the given OID. |
java.util.List |
getTypesForLovOID(java.lang.Long p_lovOID)
Returns a collection of type corresponding to the the metadata(or null if no match is found) stored in the LovDefinitionCache and corresponding to the Lov with the given OID. |
boolean |
isNameInCache(java.lang.String p_lovName)
Returns whether or not informations, for a given LOV, are stored in the LovDefinitionCache. |
boolean |
isOIDInCache(java.lang.Long p_lovOID)
Returns whether or not informations, for a given LOV, are stored in the LovDefinitionCache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static LovDefinitionCache _lovCacheInstance
private java.util.HashMap _cache
Constructor Detail |
private LovDefinitionCache()
Method Detail |
public static LovDefinitionCache getInstance()
public java.lang.String getRequestForLovOID(java.lang.Long p_lovOID)
p_lovOID
- The OID of the LOV whose SQL statement is desired.
isOIDInCache(java.lang.Long)
public java.util.List getTypesForLovOID(java.lang.Long p_lovOID)
p_lovOID
- The OID of the LOV whose types are desired.
isOIDInCache(java.lang.Long)
public boolean isOIDInCache(java.lang.Long p_lovOID)
p_lovOID
- The OID of the LOV for which we want to know if it is
in cache.
public boolean isNameInCache(java.lang.String p_lovName)
p_lovName
- The name of the LOV for which we want to know if it is
in cache.
public void addToCache(java.lang.Long p_lovOID, java.lang.String p_lovName, java.lang.String p_lovRequest, java.util.List p_metaData)
p_lovOID
- The LovOID for which we want to store the informations.p_lovName
- The LovName corresponding to the LovOID.p_lovRequest
- The LovRequest corresponding to the LovOID.
java.lang.IllegalArgumentException
- if the OID or the NAME or the REQUEST
is (are) null.public java.lang.Long getLovOID(java.lang.String p_lovName)
p_lovName
- The name for which we want to obtain the LovOID.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |