net.sf.molae.bean
Class MapBasedBeanStructure

java.lang.Object
  |
  +--net.sf.molae.bean.MapWithDefault
        |
        +--net.sf.molae.bean.MapBasedBeanStructure
All Implemented Interfaces:
BeanStructure, Serializable, Transformer
Direct Known Subclasses:
DefaultBeanStructure

public abstract class MapBasedBeanStructure
extends MapWithDefault
implements BeanStructure

Provides an implementation of the BeanStructure interface based on a map.

Since:
1.1
See Also:
Serialized Form

Constructor Summary
MapBasedBeanStructure()
          Constructs an empty MapBasedBeanStructure.
MapBasedBeanStructure(Map mapping)
          Constructs a new MapBasedBeanStructure based on the specified mapping.
 
Method Summary
 Map getProperties()
          Returns a read only map containing all properties in this structure.
 Object getProperty(String name)
          Returns the property with the specified name.
 
Methods inherited from class net.sf.molae.bean.MapWithDefault
getMapping, isReadOnly, newValue, setReadOnly, toString, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.molae.bean.BeanStructure
isReadOnly, setReadOnly
 

Constructor Detail

MapBasedBeanStructure

public MapBasedBeanStructure(Map mapping)
Constructs a new MapBasedBeanStructure based on the specified mapping.
Parameters:
mapping - Initial values of this map.

MapBasedBeanStructure

public MapBasedBeanStructure()
Constructs an empty MapBasedBeanStructure.
Method Detail

getProperty

public Object getProperty(String name)
Description copied from interface: BeanStructure
Returns the property with the specified name. If no such property exists yet, it is either created or null is returned depending on the implementation and on the status of the readOnly flag.
Specified by:
getProperty in interface BeanStructure
Following copied from interface: net.sf.molae.bean.BeanStructure
Parameters:
name - the name of the searched property.
Returns:
the property with the specified name

getProperties

public Map getProperties()
Description copied from interface: BeanStructure
Returns a read only map containing all properties in this structure.
Specified by:
getProperties in interface BeanStructure
Following copied from interface: net.sf.molae.bean.BeanStructure
Returns:
a read only map containing all properties in this structure.