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 initialization 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(AbstractWhereTranslator<R> whereTranslator)
Constructs for where translator columns.
|
FieldExtractor(java.util.List<ColumnTranslator<R>> columnTranslatorList)
Deprecated.
|
FieldExtractor(RowTranslator<R> rowTranslator)
Constructs for all fields in row.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getFieldValues(R row)
Gets the values of fields for a row.
|
@Deprecated public FieldExtractor(java.util.List<ColumnTranslator<R>> columnTranslatorList) throws ReflectException
ColumnTranslator
. Use other constructors instead of this
one since field access type cannot be determined solely from ColumnTranslator
. This
constructor always creates method access to field.columnTranslatorList
- list of fields that are read/written to databaseReflectException
- if errorpublic FieldExtractor(AbstractWhereTranslator<R> whereTranslator) throws ReflectException
whereTranslator
- use fields from this translatorReflectException
public FieldExtractor(RowTranslator<R> rowTranslator) throws ReflectException
rowTranslator
- use fields from this translatorReflectException
public java.lang.Object[] getFieldValues(R row) throws ReflectException
row
- obtain values from this rowReflectException