Class PositionWithColumnsChange<E extends AbstractElement<E> & Navigation,N extends AbstractElement<N> & Navigation>

java.lang.Object
org.assertj.db.navigation.PositionWithColumnsChange<E,N>
Type Parameters:
E - The class of the actual position (an sub-class of AbstractElement and of Navigation).
N - The class of the next position where the navigation go (an sub-class of AbstractElement and of Navigation).

public abstract class PositionWithColumnsChange<E extends AbstractElement<E> & Navigation,N extends AbstractElement<N> & Navigation> extends Object
Position during navigation.
Since:
1.1.0
Author:
Régis Pouiller
  • Constructor Details

    • PositionWithColumnsChange

      public PositionWithColumnsChange(E myself, Class<N> elementClass)
      Constructor.
      Parameters:
      myself - Actual value.
      elementClass - Class of the element of navigation (used to make instance).
  • Method Details

    • getChangeColumnInstance

      public N getChangeColumnInstance(Change change)
      Gets an instance of element corresponding to the index. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getChangeColumnInstance

      public N getChangeColumnInstance(Change change, int index)
      Gets an instance of element corresponding to the index. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      index - Index of the instance.
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getChangeColumnInstance

      public N getChangeColumnInstance(Change change, String columnName, CaseComparison comparison)
      Gets an instance of element corresponding to the column name in parameter. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      columnName - Name of the column of the element on which is the instance of element of navigation.
      comparison - Case comparison for column name.
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getModifiedChangeColumnInstance

      public N getModifiedChangeColumnInstance(Change change)
      Gets an instance of next modified element. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getModifiedChangeColumnInstance

      public N getModifiedChangeColumnInstance(Change change, int index)
      Gets an instance of modified element corresponding to the index. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      index - Index of the instance.
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getModifiedChangeColumnInstance

      public N getModifiedChangeColumnInstance(Change change, String columnName, CaseComparison comparison)
      Gets an instance of modified element corresponding to the column name in parameter. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      change - The change
      columnName - Name of the column of the element on which is the instance of element of navigation.
      comparison - Case comparison for column name.
      Returns:
      The instance.
      Throws:
      AssertJDBException - If the index is out of the bounds.
    • getDescription

      protected abstract String getDescription(int index, String columnName)
      Returns the description.
      Parameters:
      index - Index of the value.
      columnName - Name of the column of the element.
      Returns:
      The description