net.sf.molae.bean
Interface BeanStructure

All Known Implementing Classes:
MapBasedBeanStructure

public interface BeanStructure

Reprents the structure of a generic bean. This class has two purposes:

  1. Provide a unique identifier for a bean structure,
  2. Store the properties that belong to the structure.

Since:
1.1

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.
 boolean isReadOnly()
          Returns true if this BeanStructure object is marked as readonly.
 void setReadOnly()
          Marks this BeanStructure as "readonly".
 

Method Detail

getProperty

public Object getProperty(String name)
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.
Parameters:
name - the name of the searched property.
Returns:
the property with the specified name

getProperties

public Map getProperties()
Returns a read only map containing all properties in this structure.
Returns:
a read only map containing all properties in this structure.

setReadOnly

public void setReadOnly()
Marks this BeanStructure as "readonly". After a BeanStructure is marked as readonly, getProperty called for a not contained property name returns null.

isReadOnly

public boolean isReadOnly()
Returns true if this BeanStructure object is marked as readonly. After a BeanStructure is marked as readonly, getProperty called for a not contained property name returns null.
Returns:
true if this BeanStructure object is marked as readonly, false otherwise