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 Object> paramType) |
void |
clear(DBRowSet rowset) |
void |
clear(PageDefinition page,
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)
Returns the ParameterObject for the given encoded id
|
Object |
get(String type,
String id) |
Object[] |
getKey(Class<? extends Object> c,
String id)
Returns a class key from an encoded id
|
Object[] |
getKey(DBRowSet rowset,
String id)
Returns a record key for a given RowSet from an encoded id
|
Object[] |
getKey(PageDefinition page,
DBRowSet rowset,
String id)
Returns an record key for a given page and rowset
|
protected String |
getRowSetTypeName(DBRowSet rowset)
gets a unique name for a given rowset
|
String |
put(Class<? extends Object> c,
Object[] key)
Puts a key for a given class into the parameter map
|
String |
put(DBRowSet rowset,
Object[] key)
Puts a RowSet key into the parameter map
|
String |
put(PageDefinition page,
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(ParameterObject paramObject,
boolean useCache)
Puts an object into the paramter map that implements the ParameterObject interface
|
String |
put(String type,
String key,
String value,
boolean useCache)
puts a key of a particular type into the parameter map
|
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(String type, String key, String value, boolean useCache)
type - the type namekey - the key stringvalue - the valueuseCache - true if the keys should be cachedpublic void clear(String type)
public String put(ParameterObject paramObject, boolean useCache)
paramObject - the param objectuseCache - flag whether to cache the objectKeypublic String put(ParameterObject paramObject)
paramObject - the param objectpublic <T extends ParameterObject> T get(Class<T> paramType, String id)
T - the parameter typeparamType - the param type classid - the item idpublic String put(DBRowSet rowset, Object[] key)
rowset - the rowsetkey - the record keypublic Object[] getKey(DBRowSet rowset, String id)
rowset - the RowSet for which to get the keyid - the encoded idpublic void clear(DBRowSet rowset)
public String put(Class<? extends Object> c, Object[] key)
c - the classkey - the key for this classpublic Object[] getKey(Class<? extends Object> c, String id)
c - the class for which to retrieve the keyid - the encoded idpublic String put(PageDefinition page, DBRowSet rowset, Object[] key)
page - the target pagerowset - the rowsetkey - the keypublic Object[] getKey(PageDefinition page, DBRowSet rowset, String id)
page - the pagerowset - the rowsetid - the object idpublic void clear(PageDefinition page, DBRowSet rowset)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.