com.opensymphony.module.propertyset.memory
Class SerializablePropertySet
java.lang.Object
com.opensymphony.module.propertyset.AbstractPropertySet
com.opensymphony.module.propertyset.memory.MemoryPropertySet
com.opensymphony.module.propertyset.memory.SerializablePropertySet
- All Implemented Interfaces:
- PropertySet, java.io.Serializable
- Direct Known Subclasses:
- XMLPropertySet
- public class SerializablePropertySet
- extends MemoryPropertySet
- implements java.io.Serializable
The SerializablePropertySet is a PropertySet implementation that
will store any primitive of serializable object in an internal Map
which is stored in memory and can be loaded/saved by serializing the
entire SerializablePropertySet.
This offers the most basic form of persistence. Note that
setObject() will throw an IllegalPropertyException if
the passed object does not implement Serializable.
- Version:
- $Revision: 1.4 $
- Author:
- Joe Walnes
- See Also:
PropertySet,
MemoryPropertySet,
Serialized Form
| Fields inherited from interface com.opensymphony.module.propertyset.PropertySet |
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML |
|
Method Summary |
protected java.util.HashMap |
getMap()
|
void |
init(java.util.Map config,
java.util.Map args)
|
void |
remove()
Remove the propertyset and all it associated keys. |
protected void |
setImpl(int type,
java.lang.String key,
java.lang.Object value)
|
| Methods inherited from class com.opensymphony.module.propertyset.AbstractPropertySet |
getAsActualType, getBoolean, getData, getDate, getDouble, getInt, getKeys, getKeys, getKeys, getLong, getObject, getProperties, getSchema, getString, getText, getXML, isSettable, setAsActualType, setBoolean, setData, setDate, setDouble, setInt, setLong, setObject, setProperties, setSchema, setString, setText, setXML, supportsType, supportsTypes, toString, type, type |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SerializablePropertySet
public SerializablePropertySet()
init
public void init(java.util.Map config,
java.util.Map args)
- Specified by:
init in interface PropertySet- Overrides:
init in class MemoryPropertySet
remove
public void remove()
throws PropertyException
- Description copied from interface:
PropertySet
- Remove the propertyset and all it associated keys.
- Specified by:
remove in interface PropertySet- Overrides:
remove in class MemoryPropertySet
- Throws:
PropertyException
setImpl
protected void setImpl(int type,
java.lang.String key,
java.lang.Object value)
throws IllegalPropertyException,
DuplicatePropertyKeyException
- Overrides:
setImpl in class MemoryPropertySet
- Throws:
IllegalPropertyException
DuplicatePropertyKeyException
getMap
protected java.util.HashMap getMap()
- Overrides:
getMap in class MemoryPropertySet
|