R
- row typepublic class FieldExtractor<R>
extends java.lang.Object
ColumnTranslator
. This class
is used by cache package classes to get a list of primary key values for use as a CacheKey
.
The constructor performs all of the reflection instialization once by creating SormulaField
objects for each desired field. Then getFieldValues(Object)
can simply invoke reflection
methods to obtain the values for each row as needed.
Constructor and Description |
---|
FieldExtractor(java.util.List<ColumnTranslator<R>> columnTranslatorList)
Constructs from a list of
ColumnTranslator . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getFieldValues(R row)
Gets the values of fields for a row.
|
public FieldExtractor(java.util.List<ColumnTranslator<R>> columnTranslatorList) throws ReflectException
ColumnTranslator
.columnTranslatorList
- list of fields that are read/written to databaseReflectException
- if errorpublic java.lang.Object[] getFieldValues(R row) throws ReflectException
row
- obtain values from this rowReflectException