javax.rad.type.bean
Class Bean

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by javax.rad.type.bean.AbstractBean<BeanType>
          extended by javax.rad.type.bean.Bean
All Implemented Interfaces:
Cloneable, Map<String,Object>, IBean
Direct Known Subclasses:
GenericBean

public class Bean
extends AbstractBean<BeanType>

The Bean is a bean with dynamic properties. It's a sort of dynamic/generic bean without special get/set implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class javax.rad.type.bean.AbstractBean
beanType
 
Constructor Summary
Bean()
          Creates an empty Bean.
Bean(BeanType pBeanType)
          Creates a Bean with a BeanType.
Bean(Class pBeanClass)
          Creates a Bean with a bean class.
Bean(IBeanType pBeanType)
          Creates a Bean with a IBeanType.
Bean(Object pObject)
          Creates a Bean with an object.
 
Method Summary
 Object clone()
          Returns a clone of this bean.
 Object get(int pIndex)
          Gets the value of a property.
 Object getObject()
          Gets the Object that stores the values.
 void put(int pIndex, Object pValue)
          Sets the value of a property.
 
Methods inherited from class javax.rad.type.bean.AbstractBean
entrySet, get, getBeanType, put
 
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
 

Constructor Detail

Bean

public Bean()
Creates an empty Bean.


Bean

public Bean(IBeanType pBeanType)
Creates a Bean with a IBeanType.

Parameters:
pBeanType - the bean type.
Throws:
ClassCastException - if given type is not an instance of BeanType

Bean

public Bean(BeanType pBeanType)
Creates a Bean with a BeanType.

Parameters:
pBeanType - the bean type.

Bean

public Bean(Object pObject)
Creates a Bean with an object.

Parameters:
pObject - the object.

Bean

public Bean(Class pBeanClass)
Creates a Bean with a bean class.

Parameters:
pBeanClass - the bean class.
Method Detail

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.

Overrides:
put in class AbstractBean<BeanType>
Parameters:
pIndex - the property index
pValue - the value of the property

clone

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

Specified by:
clone in interface IBean
Overrides:
clone in class AbstractBean<BeanType>
Returns:
the cloned bean.

getObject

public Object getObject()
Gets the Object that stores the values. It depends on the bean type, whether it is a pojo or an object array.

Returns:
the values storage.

get

public Object get(int pIndex)
Gets the value of a property. The property is identified by the index from the property list.

Specified by:
get in class AbstractBean<BeanType>
Parameters:
pIndex - the property index
Returns:
the value of the property or null if the property was not found


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.