|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zipxap.vfs.dal.utility.JavabeanWrapper<t>
public class JavabeanWrapper<t>
This is a convenience class for working with JavaBeans. It allows developers to get and set properties of the bean dynamically.
| Constructor Summary | |
|---|---|
JavabeanWrapper(java.lang.Class beanType)
Instantiate a Javabean of the specified beanType and put
a wrapper around it. |
|
JavabeanWrapper(t bean)
Create a wrapper for the specified bean |
|
| Method Summary | |
|---|---|
t |
getJavaBean()
Retrieve the JavaBean wrapped by this JavabeanWrapper. |
java.lang.String[] |
getPropertyNameAbbreviations()
|
java.lang.String[] |
getPropertyNames()
Retrieve the names of the properties of the wrapped JavaBean. |
java.lang.Class |
getPropertyType(java.lang.String fullPropertyName)
Retrieve the type of the property of the specified propertyName. |
java.lang.Class |
getPropertyType(java.lang.String fullPropertyName,
boolean ignoreUnknownProperties)
Retrieve the type of the property of the specified propertyName. |
java.lang.Object |
getValue(java.lang.String fullPropertyName)
Retrieve the value of the property of the specified propertyName. |
boolean |
isProperty(java.lang.String fullPropertyName)
Determine if the specified propertyName is a valid property
of the Javabean wrapped by this JavabeanWrapper. |
void |
setValue(java.lang.String fullPropertyName,
java.lang.Object value)
Set the value of the property of the specified propertyName. |
void |
setValue(java.lang.String fullPropertyName,
java.lang.Object value,
boolean ignoreUnknownProperties)
Set the value of the property of the specified propertyName. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavabeanWrapper(t bean)
bean
bean - the JavaBean to wrap.public JavabeanWrapper(java.lang.Class beanType)
beanType and put
a wrapper around it.
beanType - the type of the Javabean to instantiate.| Method Detail |
|---|
public java.lang.String[] getPropertyNames()
public java.lang.String[] getPropertyNameAbbreviations()
public boolean isProperty(java.lang.String fullPropertyName)
propertyName is a valid property
of the Javabean wrapped by this JavabeanWrapper.
fullPropertyName - the name of the property to validate
true if the Javabean wrapped by this JavabeanWrapper
contains this property, else false.public java.lang.Class getPropertyType(java.lang.String fullPropertyName)
propertyName.
fullPropertyName - The name of the property to discover the type of.
propertyName.
public java.lang.Class getPropertyType(java.lang.String fullPropertyName,
boolean ignoreUnknownProperties)
propertyName.
fullPropertyName - The name of the property to discover the type of.ignoreUnknownProperties - If set to true then this method will
return a null for unknown properties, otherwise an exception is thrown.
propertyName.
UCIllegalArgumentException - if ignoreUnknownProperties is false and there
is no property named propertyName.public java.lang.Object getValue(java.lang.String fullPropertyName)
propertyName.
fullPropertyName - The name of the property to discover the value of.
propertyName.
public void setValue(java.lang.String fullPropertyName,
java.lang.Object value)
propertyName.
fullPropertyName - The name of the property to set the value of.value - The value to assign to the property.
public void setValue(java.lang.String fullPropertyName,
java.lang.Object value,
boolean ignoreUnknownProperties)
propertyName.
fullPropertyName - The name of the property to set the value of.value - The value to assign to the property.ignoreUnknownProperties - Setting this to true will cause this
method to ignore IllegalArgumentException exceptions that occur from attempting
to set the value of an unknown property via reflection.public t getJavaBean()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||