javax.rad.type.bean
Class AbstractBean<C extends IBeanType>

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by javax.rad.type.bean.AbstractBean<C>
Type Parameters:
C - the bean class.
All Implemented Interfaces:
Cloneable, Map<String,Object>, IBean
Direct Known Subclasses:
Bean

public abstract class AbstractBean<C extends IBeanType>
extends AbstractMap<String,Object>
implements IBean

The AbstractBean is an AbstractMap and the default IBean implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  C beanType
          Stores the bean type.
 
Constructor Summary
protected AbstractBean(C pBeanType)
          Creates a AbstractBean with a specific IBeanType.
 
Method Summary
 Object clone()
          Returns a clone of this bean.
 Set<Map.Entry<String,Object>> entrySet()
          
abstract  Object get(int pPropertyIndex)
          Gets the value of the property index.
 Object get(String pPropertyName)
          Gets the value of the property name.
 C getBeanType()
          Gets the property names available by this bean.
 void put(int pIndex, Object pValue)
          Sets the value of a property.
 Object put(String pPropertyName, Object pValue)
          Sets the value of the property name.
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

beanType

protected C extends IBeanType beanType
Stores the bean type.

Constructor Detail

AbstractBean

protected AbstractBean(C pBeanType)
Creates a AbstractBean with a specific IBeanType.

Parameters:
pBeanType - the bean type.
Method Detail

get

public abstract Object get(int pPropertyIndex)
Gets the value of the property index.

Parameters:
pPropertyIndex - the property index.
Returns:
the value of the property index.

getBeanType

public C getBeanType()
Gets the property names available by this bean.

Specified by:
getBeanType in interface IBean
Returns:
the property names.

get

public Object get(String pPropertyName)
Gets the value of the property name.

Specified by:
get in interface IBean
Parameters:
pPropertyName - the property name.
Returns:
the value of the property name.

put

public Object put(String pPropertyName,
                  Object pValue)
Sets the value of the property name.

Specified by:
put in interface Map<String,Object>
Specified by:
put in interface IBean
Overrides:
put in class AbstractMap<String,Object>
Parameters:
pPropertyName - the property name.
pValue - the value of the property name.
Returns:
the replaced value.

clone

public Object clone()
Returns a clone of this bean.

Specified by:
clone in interface IBean
Overrides:
clone in class AbstractMap<String,Object>
Returns:
the cloned bean.

entrySet

public Set<Map.Entry<String,Object>> entrySet()

Specified by:
entrySet in interface Map<String,Object>
Specified by:
entrySet in class AbstractMap<String,Object>

put

public void put(int pIndex,
                Object pValue)
Sets the value of a property. The property is identified by the index from the property list.

Parameters:
pIndex - the property index
pValue - the value of the property


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.