Class Row

java.lang.Object
org.assertj.db.type.Row
All Implemented Interfaces:
DbElement, WithColumnLetterCase, WithPrimaryKeyLetterCase

public class Row extends Object implements DbElement, WithColumnLetterCase, WithPrimaryKeyLetterCase
Row in a AbstractDbData.

A row can have many columns with a value in front of this column.

Note : you never instantiate directly this class. You will get an object of this class from a Table or a Request by using AbstractDbData.getRow(int) or with the list by using AbstractDbData.getRowsList().

Author:
Régis Pouiller
  • Method Details

    • getColumnLetterCase

      public LetterCase getColumnLetterCase()
      Returns the letter case of the columns.
      Specified by:
      getColumnLetterCase in interface WithColumnLetterCase
      Returns:
      The letter case of the columns.
    • getPrimaryKeyLetterCase

      public LetterCase getPrimaryKeyLetterCase()
      Returns the letter case of the primary keys.
      Specified by:
      getPrimaryKeyLetterCase in interface WithPrimaryKeyLetterCase
      Returns:
      The letter case of the primary keys.
    • getPksNameList

      public List<String> getPksNameList()
      Return the list of the primary keys name.
      Returns:
      The list of the primary keys name.
    • getPksValueList

      public List<Value> getPksValueList()
      Return the list of the primary keys value.
      Returns:
      The list of the primary keys value.
    • getColumnsNameList

      public List<String> getColumnsNameList()
      Returns the list of the columns name.
      Returns:
      The list of the columns name.
    • getValuesList

      public List<Value> getValuesList()
      Returns the list of the values for the data from database.
      Returns:
      The list of the values.
    • getPksValues

      public Value[] getPksValues()
      Returns the primary keys value.
      Returns:
      The primary keys value.
    • hasPksValuesEqualTo

      public boolean hasPksValuesEqualTo(Value[] pksValues)
      Returns if the values of the primary keys are equal to the values in parameter.
      Parameters:
      pksValues - The values of the primary keys to compare.
      Returns:
      If the values of the primary keys are equal.
    • hasValues

      public boolean hasValues(Row row)
      Returns if the values are equal to the value of the Row in parameter.
      Parameters:
      row - The Row to compare with.
      Returns:
      If the values are equal.
    • getColumnValue

      public Value getColumnValue(int index)
      Returns the value corresponding to the column index.
      Parameters:
      index - The index
      Returns:
      The value
    • getColumnValue

      public Value getColumnValue(String columnName)
      Returns the value corresponding to the column name in the Row.
      Parameters:
      columnName - The column name (must be not null).
      Returns:
      The value
      Throws:
      NullPointerException - If the columnName parameter is null.