public class ParameterMap extends Object
Modifier and Type | Field and Description |
---|---|
protected Hashtable<String,String> |
codeMap |
protected Hashtable<String,Hashtable<String,Object>> |
typeMap |
Constructor and Description |
---|
ParameterMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear(Class<? extends ParameterObject> paramType) |
void |
clear(DBRowSet rowset) |
void |
clear(String type) |
protected String |
encodeAndStore(String typeName,
String objectKey,
Object item,
boolean useCache)
encodes the objectKey and stores the item in the parameter map
|
String |
encodeString(String valueAsString) |
String |
encodeStringWithCache(String valueAsString) |
<T extends ParameterObject> |
get(Class<T> paramType,
String id)
Puts an object into the paramter map that implements the ParameterObject interface
|
Object |
get(String type,
String id)
Gets an object from the parameter map for a given type and id
|
Object[] |
getKey(DBRowSet rowset,
String id) |
Object[] |
getKey(PageDefinition page,
DBRowSet rowset,
String id)
returns an record key for a given page
|
protected String |
getRowSetTypeName(DBRowSet rowset)
gets a unique name for a given rowset
|
String |
put(DBRowSet rowset,
Object[] key) |
String |
put(PageDefinition targetPage,
DBRowSet rowset,
Object[] key)
Generates an idParam which is only valid for the given page.
|
String |
put(ParameterObject paramObject)
Puts an object into the paramter map that implements the ParameterObject interface
|
String |
put(String type,
String key,
boolean useCache) |
protected void |
putValue(String typeName,
String encodedId,
Object item)
puts an object into the parameter map
|
protected String getRowSetTypeName(DBRowSet rowset)
rowset
- the rowsetprotected void putValue(String typeName, String encodedId, Object item)
typeName
- the type nameencodedId
- the iditem
- the objectprotected String encodeAndStore(String typeName, String objectKey, Object item, boolean useCache)
typeName
- the type nameobjectKey
- the object keyitem
- the objectuseCache
- flag whether to cache the objectKeypublic String put(ParameterObject paramObject)
paramObject
- the param objectpublic String put(PageDefinition targetPage, DBRowSet rowset, Object[] key)
targetPage
- the target pagerowset
- the rowsetkey
- the keypublic Object get(String type, String id)
type
- the object type (typically the class name)id
- the encoded idParampublic void clear(String type)
public <T extends ParameterObject> T get(Class<T> paramType, String id)
paramType
- the param typeid
- the item idpublic void clear(Class<? extends ParameterObject> paramType)
public void clear(DBRowSet rowset)
public Object[] getKey(PageDefinition page, DBRowSet rowset, String id)
page
- the pagerowset
- the rowsetid
- the object idCopyright © 2008–2023 Apache Software Foundation. All rights reserved.