public class DataListEntry extends Object implements RecordData, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected DataListHead |
head |
protected int |
rownum |
protected Object[] |
values |
| Constructor and Description |
|---|
DataListEntry(DataListHead head,
Object[] values) |
DataListEntry(DataListHead head,
Object[] values,
int rownum) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareKey(Column[] keyColumns,
Object[] key)
Compares a given record key with the key of the entry
|
<T> T |
get(Column column,
Class<T> returnType) |
Object |
get(ColumnExpr column)
returns the record value for a particular column
|
Object[] |
getArray(ColumnExpr... columns) |
boolean |
getBoolean(ColumnExpr column) |
boolean |
getBoolean(int index) |
ColumnExpr |
getColumn(int index)
returns the column expression for a given column
This is the reverse operation of getFieldIndex()
|
Date |
getDate(ColumnExpr column) |
Date |
getDate(int index) |
BigDecimal |
getDecimal(ColumnExpr column) |
BigDecimal |
getDecimal(int index) |
<T extends Enum<?>> |
getEnum(Column column) |
<T extends Enum<?>> |
getEnum(ColumnExpr column,
Class<T> enumType) |
<T extends Enum<?>> |
getEnum(int index,
Class<T> enumType) |
int |
getFieldCount()
returns the number of field available
|
int |
getFieldIndex(ColumnExpr column)
returns the index of the given column expression
Indexed operations provide better performance for bulk processing
|
int |
getFieldIndex(String column)
returns the index of the column expression with the given name
|
<T extends DataListHead> |
getHead() |
int |
getInt(ColumnExpr column) |
int |
getInt(int index) |
long |
getLong(ColumnExpr column) |
long |
getLong(int index) |
long |
getRecordId(EntityType entityType)
Returns the record id for a type of entity which has a single numeric primary key
|
Object[] |
getRecordKey(EntityType entityType)
Returns the record key for a type of entity
|
int |
getRownum() |
String |
getString(ColumnExpr column) |
String |
getString(int index) |
String |
getText(ColumnExpr col) |
String |
getText(String name) |
Object |
getValue(ColumnExpr column)
Deprecated.
|
Object |
getValue(int index)
returns the value of the field at the given index position
Indexed operations provide better performance for bulk processing compared to getValue(ColumnExpr)
|
boolean |
hasField(ColumnExpr column) |
protected int |
indexOf(ColumnExpr column) |
boolean |
isNull(ColumnExpr column)
checks if the record contains no value (null) for the given column
|
boolean |
isNull(int index)
checks if the field at the given index position contains no value (null)
Indexed operations provide better performance for bulk processing compared to isNull(ColumnExpr)
|
void |
modifyValue(ColumnExpr col,
Object value) |
int |
setBeanProperties(Object bean) |
int |
setBeanProperties(Object bean,
Collection<? extends ColumnExpr> ignoreList)
copies all field values into a static Java Bean.
|
String |
toString() |
void |
updateData(RecordData recData)
Updates the fields of the entry with the corresponding fields of a record.
|
protected final DataListHead head
protected final Object[] values
protected int rownum
public DataListEntry(DataListHead head, Object[] values, int rownum)
public DataListEntry(DataListHead head, Object[] values)
public <T extends DataListHead> T getHead()
public Object[] getRecordKey(EntityType entityType)
entityType - the entity type or rowset for which to get keypublic long getRecordId(EntityType entityType)
entityType - the entity type or rowset for which to get keyInvalidArgumentException - if the entity has not a single numeric primary keypublic boolean compareKey(Column[] keyColumns, Object[] key)
keyColumns - the columns which make up the keykey - the key to compare the current entry topublic void updateData(RecordData recData)
recData - the record with the updated (newer) fieldspublic void modifyValue(ColumnExpr col, Object value)
public int getRownum()
public int getFieldCount()
RecordDatagetFieldCount in interface RecordDatapublic boolean hasField(ColumnExpr column)
public int getFieldIndex(ColumnExpr column)
RecordDatagetFieldIndex in interface RecordDatacolumn - the column for which to return the indexpublic int getFieldIndex(String column)
RecordDatagetFieldIndex in interface RecordDatacolumn - the name of the column for which to return the indexpublic ColumnExpr getColumn(int index)
RecordDatagetColumn in interface RecordDataindex - field index of the column expressionpublic Object getValue(int index)
RecordDatagetValue in interface RecordDataindex - the field index for which to return the valuepublic final Object get(ColumnExpr column)
RecordDataget in interface RecordDatacolumn - the column for which to return the value@Deprecated public Object getValue(ColumnExpr column)
column - the columnpublic final Object[] getArray(ColumnExpr... columns)
public boolean isNull(int index)
RecordDataisNull in interface RecordDataindex - the field indexpublic String getString(int index)
public final String getString(ColumnExpr column)
public int getInt(int index)
public final int getInt(ColumnExpr column)
public long getLong(int index)
public final long getLong(ColumnExpr column)
public BigDecimal getDecimal(int index)
public final BigDecimal getDecimal(ColumnExpr column)
public boolean getBoolean(int index)
public final boolean getBoolean(ColumnExpr column)
public final <T extends Enum<?>> T getEnum(ColumnExpr column, Class<T> enumType)
public Date getDate(int index)
public final Date getDate(ColumnExpr column)
public final boolean isNull(ColumnExpr column)
RecordDataisNull in interface RecordDatacolumn - the columnpublic int setBeanProperties(Object bean, Collection<? extends ColumnExpr> ignoreList)
RecordDataIn order to map column names to property names the property name is detected by ColumnExpr.getBeanPropertyName()
setBeanProperties in interface RecordDatabean - the Java Bean for which to set the propertiesignoreList - list of columns to skip (optional)public int setBeanProperties(Object bean)
public String getText(ColumnExpr col)
protected int indexOf(ColumnExpr column)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.