Package org.hibernate.bytecode.javassist
Class BulkAccessor
java.lang.Object
org.hibernate.bytecode.javassist.BulkAccessor
- All Implemented Interfaces:
Serializable
A JavaBean accessor.
This object provides methods that set/get multiple properties of a JavaBean at once. This class and its support classes have been developed for the comaptibility with cglib (http://cglib.sourceforge.net/).
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BulkAccessorCreates a new instance ofBulkAccessor.String[]Returns the setter names of properties.Class[]Returns the types of properties.Object[]getPropertyValues(Object bean) Returns the values of properties of a given bean.abstract voidgetPropertyValues(Object bean, Object[] values) Obtains the values of properties of a given bean.String[]Returns the getter names of the properties.abstract voidsetPropertyValues(Object bean, Object[] values) Sets properties of a given bean to specified values.
-
Field Details
-
target
-
getters
-
setters
-
types
-
-
Constructor Details
-
BulkAccessor
protected BulkAccessor()
-
-
Method Details
-
getPropertyValues
Obtains the values of properties of a given bean.- Parameters:
bean- JavaBean.values- the obtained values are stored in this array.
-
setPropertyValues
Sets properties of a given bean to specified values.- Parameters:
bean- JavaBean.values- the values assinged to properties.
-
getPropertyValues
Returns the values of properties of a given bean.- Parameters:
bean- JavaBean.
-
getPropertyTypes
Returns the types of properties. -
getGetters
Returns the setter names of properties. -
getSetters
Returns the getter names of the properties. -
create
public static BulkAccessor create(Class beanClass, String[] getters, String[] setters, Class[] types) Creates a new instance ofBulkAccessor. The created instance provides methods for setting/getting specified properties at once.- Parameters:
beanClass- the class of the JavaBeans accessed through the created object.getters- the names of setter methods for specified properties.setters- the names of getter methods for specified properties.types- the types of specified properties.
-