Top Description Fields Constructors Methods
org.hibernate.bytecode.javassist

public abstract Class BulkAccessor

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.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/).

Authors
Muga Nishizawa, modified by Shigeru Chiba

Field Summary

Modifier and TypeField and Description
protected String[]
protected String[]
protected Class<T>
protected Class<T>[]

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static BulkAccessor
create(Class<T>
the class of the JavaBeans accessed through the created object.
beanClass
,
String[]
the names of setter methods for specified properties.
getters
,
String[]
the names of getter methods for specified properties.
setters
,
Class<T>[]
the types of specified properties.
types
)

Creates a new instance of BulkAccessor.

public String[]
getGetters()

Returns the setter names of properties.

public Class<T>[]
getPropertyTypes()

Returns the types of properties.

public abstract void
getPropertyValues(Object
JavaBean.
bean
,
Object[]
the obtained values are stored in this array.
values
)

Obtains the values of properties of a given bean.

public Object[]
getPropertyValues(Object
JavaBean.
bean
)

Returns the values of properties of a given bean.

public String[]
getSetters()

Returns the getter names of the properties.

public abstract void
setPropertyValues(Object
JavaBean.
bean
,
Object[]
the values assinged to properties.
values
)

Sets properties of a given bean to specified values.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gettersback to summary
protected String[] getters
settersback to summary
protected String[] setters
targetback to summary
protected Class<T> target
typesback to summary
protected Class<T>[] types

Constructor Detail

BulkAccessorback to summary
protected BulkAccessor()

Method Detail

createback to summary
public static BulkAccessor create(Class<T> beanClass, String[] getters, String[] setters, Class<T>[] types)

Creates a new instance of BulkAccessor. The created instance provides methods for setting/getting specified properties at once.

Parameters
beanClass:Class<T>

the class of the JavaBeans accessed through the created object.

getters:String[]

the names of setter methods for specified properties.

setters:String[]

the names of getter methods for specified properties.

types:Class<T>[]

the types of specified properties.

getGettersback to summary
public String[] getGetters()

Returns the setter names of properties.

getPropertyTypesback to summary
public Class<T>[] getPropertyTypes()

Returns the types of properties.

getPropertyValuesback to summary
public abstract void getPropertyValues(Object bean, Object[] values)

Obtains the values of properties of a given bean.

Parameters
bean:Object

JavaBean.

values:Object[]

the obtained values are stored in this array.

getPropertyValuesback to summary
public Object[] getPropertyValues(Object bean)

Returns the values of properties of a given bean.

Parameters
bean:Object

JavaBean.

getSettersback to summary
public String[] getSetters()

Returns the getter names of the properties.

setPropertyValuesback to summary
public abstract void setPropertyValues(Object bean, Object[] values)

Sets properties of a given bean to specified values.

Parameters
bean:Object

JavaBean.

values:Object[]

the values assinged to properties.