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

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

public abstract class AbstractBean<C extends IBeanType>
extends java.util.AbstractMap<java.lang.String,java.lang.Object>
implements IBean

The AbstractBean is an AbstractMap and the default IBean implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.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
 java.lang.Object clone()
          Returns a clone of this bean.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
          
abstract  java.lang.Object get(int pPropertyIndex)
          Gets the value of the property index.
 java.lang.Object get(java.lang.String pPropertyName)
          Gets the value of the property name.
 C getBeanType()
          Gets the property names available by this bean.
 void put(int pIndex, java.lang.Object pValue)
          Sets the value of a property.
 java.lang.Object put(java.lang.String pPropertyName, java.lang.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
 
Methods inherited from interface javax.rad.type.bean.IBean
putAll
 

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 java.lang.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 java.lang.Object get(java.lang.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 java.lang.Object put(java.lang.String pPropertyName,
                            java.lang.Object pValue)
Sets the value of the property name.

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

clone

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

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

entrySet

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

Specified by:
entrySet in interface java.util.Map<java.lang.String,java.lang.Object>
Specified by:
entrySet in class java.util.AbstractMap<java.lang.String,java.lang.Object>

put

public void put(int pIndex,
                java.lang.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.