|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.type.BeanUtil
public final class BeanUtil
Implements the EL notation for a generic access to object methods or members.
| Method Summary | ||
|---|---|---|
static java.lang.Object |
get(java.lang.Object pBean,
java.lang.String pPropertyName)
Gets the property value from the given bean or sub bean. |
|
static void |
set(java.lang.Object pBean,
java.lang.String pPropertyName,
java.lang.Object pValue)
Sets the property value to the given bean or sub bean. |
|
static
|
toArray(java.lang.Object[] pSource,
T[] pDest,
java.lang.String pPropertyName)
Returns an array containing all of the properties identified by pPropertyName
from pSource in proper sequence. |
|
static java.util.Hashtable<java.lang.Object,java.lang.Object> |
toHashtable(java.util.List<?> pObjects,
java.lang.String pKey,
java.lang.String pValue)
Returns a hashtable with a specific property as key and a specific property as value. |
|
static
|
toList(java.lang.Object[] pSource,
java.lang.String pPropertyName)
Returns a list containing all of the properties identified by pPropertyName
from pSource in proper sequence. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Object get(java.lang.Object pBean,
java.lang.String pPropertyName)
Object result = BeanUtil.get(bean, "orders[5].ordernumber");
If the property name is null, the bean is returned.
pBean - the bean.pPropertyName - the property name.
public static void set(java.lang.Object pBean,
java.lang.String pPropertyName,
java.lang.Object pValue)
BeanUtil.set(bean, "orders[5].ordernumber", "4711");
pBean - the bean.pPropertyName - the property name.pValue - the value to set.
public static <T> T[] toArray(java.lang.Object[] pSource,
T[] pDest,
java.lang.String pPropertyName)
pPropertyName
from pSource in proper sequence. The runtime type of the returned array is that
of the specified pDest array.
T - the type for the result arraypSource - the source object listpDest - the result arraypPropertyName - the property name for getting the desired values
pSource filled with values
public static <T> java.util.List<T> toList(java.lang.Object[] pSource,
java.lang.String pPropertyName)
pPropertyName
from pSource in proper sequence. The runtime type of the returned array is that
of the specified pDest array.
T - the type for the result arraypSource - the source object listpPropertyName - the property name for getting the desired values
pSource filled with values
public static java.util.Hashtable<java.lang.Object,java.lang.Object> toHashtable(java.util.List<?> pObjects,
java.lang.String pKey,
java.lang.String pValue)
pObjects - a list of objects with properties for the hashtablepKey - the key property namepValue - the value property name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||