public class PropertyUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Accessor |
accessor(String nestedPropertyName)
Compiles an accessor that can be used for fast access for the nested
property of the objects of a given class.
|
static Object |
getProperty(Object object,
String nestedPropertyName)
Returns object property using JavaBean-compatible introspection with one
addition - a property can be a dot-separated property name path.
|
static void |
installAccessorFactory(AccessorFactory accessorFactory)
This method installs custom accessor factory to be used by property utils.
|
static void |
setProperty(Object object,
String nestedPropertyName,
Object value)
Sets object property using JavaBean-compatible introspection with one
addition - a property can be a dot-separated property name path.
|
public static Accessor accessor(String nestedPropertyName)
public static Object getProperty(Object object, String nestedPropertyName) throws CayenneRuntimeException
CayenneRuntimeException
public static void setProperty(Object object, String nestedPropertyName, Object value) throws CayenneRuntimeException
CayenneRuntimeException
public static void installAccessorFactory(AccessorFactory accessorFactory)
A factory that produces BeanAccessor
is used by default.
accessorFactory
- new factory to useCopyright © 2001–2019 Apache Cayenne. All rights reserved.