|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.opensymphony.module.propertyset.utility.CachingPropertySet
A PropertySet which decorates another PropertySet and caches the results. This is only sensible to use in a situation where your application has exclusive access to the underlying PropertySet (otherwise it can be dangerous to use). You can also use this property set to bulk load data from the decorated property set when the PS is created. THINK BEFORE USING THIS - IT COULD HURT YOU ;)
Fields inherited from interface com.opensymphony.module.propertyset.PropertySet |
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML |
Constructor Summary | |
CachingPropertySet(PropertySet decoratedPS)
|
|
CachingPropertySet(PropertySet decoratedPS,
boolean bulkLoad)
|
Method Summary | |
boolean |
exists(java.lang.String key)
Determine if property exists. |
boolean |
getBoolean(java.lang.String key)
|
byte[] |
getData(java.lang.String key)
|
java.util.Date |
getDate(java.lang.String key)
|
double |
getDouble(java.lang.String key)
|
int |
getInt(java.lang.String key)
|
java.util.Collection |
getKeys()
List all keys. |
java.util.Collection |
getKeys(int type)
List all keys of certain type. |
java.util.Collection |
getKeys(java.lang.String prefix)
List all keys starting with supplied prefix. |
java.util.Collection |
getKeys(java.lang.String prefix,
int type)
List all keys starting with supplied prefix of certain type. |
long |
getLong(java.lang.String key)
|
java.lang.Object |
getObject(java.lang.String key)
|
java.util.Properties |
getProperties(java.lang.String key)
|
PropertySetSchema |
getSchema()
|
java.lang.String |
getString(java.lang.String key)
String of maximum 255 chars. |
java.lang.String |
getText(java.lang.String key)
String of unlimited length. |
int |
getType(java.lang.String key)
Returns type of value. |
org.w3c.dom.Document |
getXML(java.lang.String key)
|
boolean |
isSettable(java.lang.String property)
Whether this PropertySet implementation allows values to be set (as opposed to read-only). |
void |
remove(java.lang.String key)
Removes property. |
void |
setAsActualType(java.lang.String key,
java.lang.Object value)
|
void |
setBoolean(java.lang.String key,
boolean value)
|
void |
setData(java.lang.String key,
byte[] value)
|
void |
setDate(java.lang.String key,
java.util.Date value)
|
void |
setDouble(java.lang.String key,
double value)
|
void |
setInt(java.lang.String key,
int value)
|
void |
setLong(java.lang.String key,
long value)
|
void |
setObject(java.lang.String key,
java.lang.Object value)
|
void |
setProperties(java.lang.String key,
java.util.Properties value)
|
void |
setSchema(PropertySetSchema schema)
|
void |
setString(java.lang.String key,
java.lang.String value)
|
void |
setText(java.lang.String key,
java.lang.String value)
|
void |
setXML(java.lang.String key,
org.w3c.dom.Document value)
|
boolean |
supportsType(int type)
Whether this PropertySet implementation allows the type specified to be stored or retrieved. |
boolean |
supportsTypes()
Whether this PropertySet implementation supports types when storing values (i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CachingPropertySet(PropertySet decoratedPS)
public CachingPropertySet(PropertySet decoratedPS, boolean bulkLoad)
decoratedPS
- The decorated property setbulkLoad
- Whether or not to bulk load data from the decorated property set into the cacheMethod Detail |
public boolean getBoolean(java.lang.String key) throws PropertyException
getBoolean
in interface PropertySet
public void setBoolean(java.lang.String key, boolean value) throws PropertyException
setBoolean
in interface PropertySet
public int getInt(java.lang.String key) throws PropertyException
getInt
in interface PropertySet
public void setInt(java.lang.String key, int value) throws PropertyException
setInt
in interface PropertySet
public long getLong(java.lang.String key) throws PropertyException
getLong
in interface PropertySet
public void setLong(java.lang.String key, long value) throws PropertyException
setLong
in interface PropertySet
public double getDouble(java.lang.String key) throws PropertyException
getDouble
in interface PropertySet
public void setDouble(java.lang.String key, double value) throws PropertyException
setDouble
in interface PropertySet
public java.lang.String getString(java.lang.String key) throws PropertyException
PropertySet
String
of maximum 255 chars.getString
in interface PropertySet
public void setString(java.lang.String key, java.lang.String value) throws PropertyException
setString
in interface PropertySet
public java.lang.String getText(java.lang.String key) throws PropertyException
PropertySet
String
of unlimited length.getText
in interface PropertySet
public void setText(java.lang.String key, java.lang.String value) throws PropertyException
setText
in interface PropertySet
public java.util.Date getDate(java.lang.String key) throws PropertyException
getDate
in interface PropertySet
public void setDate(java.lang.String key, java.util.Date value) throws PropertyException
setDate
in interface PropertySet
public java.lang.Object getObject(java.lang.String key) throws PropertyException
getObject
in interface PropertySet
public void setObject(java.lang.String key, java.lang.Object value) throws PropertyException
setObject
in interface PropertySet
public org.w3c.dom.Document getXML(java.lang.String key) throws PropertyException
getXML
in interface PropertySet
public void setXML(java.lang.String key, org.w3c.dom.Document value) throws PropertyException
setXML
in interface PropertySet
public byte[] getData(java.lang.String key) throws PropertyException
getData
in interface PropertySet
public void setData(java.lang.String key, byte[] value) throws PropertyException
setData
in interface PropertySet
public java.util.Properties getProperties(java.lang.String key) throws PropertyException
getProperties
in interface PropertySet
public void setProperties(java.lang.String key, java.util.Properties value) throws PropertyException
setProperties
in interface PropertySet
public void setSchema(PropertySetSchema schema) throws PropertyException
setSchema
in interface PropertySet
public PropertySetSchema getSchema() throws PropertyException
getSchema
in interface PropertySet
public boolean exists(java.lang.String key) throws PropertyException
PropertySet
exists
in interface PropertySet
public void remove(java.lang.String key) throws PropertyException
PropertySet
remove
in interface PropertySet
public int getType(java.lang.String key) throws PropertyException
PropertySet
getType
in interface PropertySet
com.opensymphony.module.propertyset.PropertySet
public java.util.Collection getKeys() throws PropertyException
PropertySet
getKeys
in interface PropertySet
com.opensymphony.module.propertyset.PropertySet
Collection
of
String
s.public java.util.Collection getKeys(int type) throws PropertyException
PropertySet
getKeys
in interface PropertySet
com.opensymphony.module.propertyset.PropertySet
type
- Type to list. See static class variables. If null, then
all types shall be returned.Collection
of
String
s.public java.util.Collection getKeys(java.lang.String prefix) throws PropertyException
PropertySet
getKeys
in interface PropertySet
com.opensymphony.module.propertyset.PropertySet
prefix
- String that keys must start with. If null, than all
keys shall be returned.Collection
of
String
s.public java.util.Collection getKeys(java.lang.String prefix, int type) throws PropertyException
PropertySet
getKeys
in interface PropertySet
com.opensymphony.module.propertyset.PropertySet
prefix
- String that keys must start with. If null, than all
keys shall be returned.type
- Type to list. See static class variables. If null, then
all types shall be returned.Collection
of
String
s.public boolean supportsTypes()
PropertySet
supportsTypes
in interface PropertySet
public boolean supportsType(int type)
PropertySet
supportsType
in interface PropertySet
public boolean isSettable(java.lang.String property)
PropertySet
isSettable
in interface PropertySet
public void setAsActualType(java.lang.String key, java.lang.Object value) throws PropertyException
setAsActualType
in interface PropertySet
|
See www.opensymphony.com for more information. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |