public interface PropertyAccessor
Modifier and Type | Method and Description |
---|---|
PropertyAccessor |
accessorWithConversions(ArooaConverter converter)
Provide an accessor that performs conversions.
|
BeanOverview |
getBeanOverview(java.lang.Class<?> forClass)
Provide
org.oddjob.arooo.BeanOverview . |
ArooaClass |
getClassName(java.lang.Object bean)
Get the
ArooaClass for a bean. |
java.lang.Object |
getProperty(java.lang.Object bean,
java.lang.String property)
Get a property.
|
<T> T |
getProperty(java.lang.Object bean,
java.lang.String property,
java.lang.Class<T> required)
Get a property of a required type.
|
void |
setIndexedProperty(java.lang.Object bean,
java.lang.String name,
int index,
java.lang.Object value)
Set an indexed property on a bean.
|
void |
setMappedProperty(java.lang.Object bean,
java.lang.String name,
java.lang.String key,
java.lang.Object value)
Set a mapped property on a bean.
|
void |
setProperty(java.lang.Object bean,
java.lang.String expression,
java.lang.Object value)
Set a property using a property expression.
|
void |
setSimpleProperty(java.lang.Object bean,
java.lang.String name,
java.lang.Object value)
Set a property on a bean.
|
void setProperty(java.lang.Object bean, java.lang.String expression, java.lang.Object value) throws ArooaPropertyException
bean
- The bean. Must not be null.expression
- The name. Must not be null.value
- The value. Can be null.ArooaPropertyException
void setSimpleProperty(java.lang.Object bean, java.lang.String name, java.lang.Object value) throws ArooaPropertyException
bean
- The bean. Must not be null.name
- The name. Must not be null.value
- The value. Can be null.ArooaPropertyException
void setMappedProperty(java.lang.Object bean, java.lang.String name, java.lang.String key, java.lang.Object value) throws ArooaPropertyException
bean
- The bean. Must not be null.name
- The name. Must not be null.key
- The mapped property's key. Must not be null.value
- The value. Can be null.ArooaPropertyException
void setIndexedProperty(java.lang.Object bean, java.lang.String name, int index, java.lang.Object value) throws ArooaPropertyException
bean
- The bean. Must not be null.name
- The name. Must not be null.index
- The indexed property's index. 0 based.value
- The value. Can be null.ArooaPropertyException
ArooaClass getClassName(java.lang.Object bean)
ArooaClass
for a bean.bean
- BeanOverview getBeanOverview(java.lang.Class<?> forClass) throws ArooaException
org.oddjob.arooo.BeanOverview
. Note that this
will provide the overview for the Java class. If using a bean
that might be a dynabean then use
getArooaClass(bean).getBeanOverview()
instead.forClassCl
- ArooaException
java.lang.Object getProperty(java.lang.Object bean, java.lang.String property) throws ArooaPropertyException
bean
- The bean.The
- property.ArooaPropertyException
<T> T getProperty(java.lang.Object bean, java.lang.String property, java.lang.Class<T> required) throws ArooaPropertyException, ArooaConversionException
bean
- The bean.The
- property.ArooaPropertyException
ArooaConversionException
PropertyAccessor accessorWithConversions(ArooaConverter converter)
converter
- The converter.