Interface RecordData

All Known Subinterfaces:
Record
All Known Implementing Classes:
BeanRecordProxy, DataListEntry, DBReader, DBRecord, DBRecordBase, DBRecordBean, DBRecordData, TRecord

public interface RecordData
The RecordData interface provides methods for accessing data and context specific metadata.

The Record interface is implemented by the classes DBReader and DBRecordData.

  • Method Summary

    Modifier and Type
    Method
    Description
    get(ColumnExpr column)
    returns the record value for a particular column
    <V> V
    get(ColumnExpr column, Class<V> valueType)
    returns the record value for a particular column
    getColumn(int i)
    returns the column expression for a given column This is the reverse operation of getFieldIndex()
    int
    returns the number of field available
    int
    returns the index of the column expression with the given name
    int
    returns the index of the given column expression Indexed operations provide better performance for bulk processing
    getValue(int index)
    Returns the raw field value based on the field index.
    <V> V
    getValue(int index, Class<V> valueType)
    returns the record value for a particular 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)
    boolean
    checks if the record contains no value (null) for the given column
    int
    setBeanProperties(Object bean, Collection<? extends ColumnExpr> ignoreList)
    copies all field values into a static Java Bean.
  • Method Details

    • getFieldCount

      int getFieldCount()
      returns the number of field available
      Returns:
      field count
    • getFieldIndex

      int getFieldIndex(ColumnExpr column)
      returns the index of the given column expression Indexed operations provide better performance for bulk processing
      Parameters:
      column - the column for which to return the index
      Returns:
      the field index of the given column
    • getFieldIndex

      int getFieldIndex(String column)
      returns the index of the column expression with the given name
      Parameters:
      column - the name of the column for which to return the index
      Returns:
      the field index of the given column
    • getColumn

      ColumnExpr getColumn(int i)
      returns the column expression for a given column This is the reverse operation of getFieldIndex()
      Parameters:
      i - field index of the column expression
      Returns:
      the column expression object or null if the index is out of range
    • getValue

      Object getValue(int index)
      Returns the raw field value based on the field index. Indexed operations provide better performance for bulk processing compared to get(ColumnExpr)
      Parameters:
      index - the field index
      Returns:
      the raw field value
    • getValue

      <V> V getValue(int index, Class<V> valueType)
      returns the record value for a particular column
      Type Parameters:
      V - the desired return type for the value
      Parameters:
      index - the field index for which to return the value
      valueType - the desired value type
      Returns:
      the record value for the given column
    • get

      Object get(ColumnExpr column)
      returns the record value for a particular column
      Parameters:
      column - the column for which to return the value
      Returns:
      the record value for the given column
    • get

      <V> V get(ColumnExpr column, Class<V> valueType)
      returns the record value for a particular column
      Parameters:
      column - the column for which to return the value
      valueType - the desired value type
      Returns:
      the record value for the given column
    • isNull

      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)
      Parameters:
      index - the field index
      Returns:
      true if the field value is null or false otherwise
    • isNull

      boolean isNull(ColumnExpr column)
      checks if the record contains no value (null) for the given column
      Parameters:
      column - the column
      Returns:
      true if the value for the column is null or false otherwise
    • setBeanProperties

      int setBeanProperties(Object bean, Collection<? extends ColumnExpr> ignoreList)
      copies all field values into a static Java Bean. In order to map column names to property names the property name is detected by ColumnExpr.getBeanPropertyName()
      Parameters:
      bean - the Java Bean for which to set the properties
      ignoreList - list of columns to skip (optional)
      Returns:
      number of fields that have been copied