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

java.lang.Object
org.assertj.db.navigation.PositionWithChanges<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 PositionWithChanges<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

    • PositionWithChanges

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

    • getChangesInstance

      public E getChangesInstance(Changes changes, ChangeType changeType, String tableName)
      Gets an instance of changes corresponding to the index and the type of change. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      changes - The changes
      changeType - Type of the change on which is the instance of change.
      tableName - Name of the table on which is the instance of change.
      Returns:
      The changes implementation.
    • getChangeInstance

      public N getChangeInstance(Changes changes, ChangeType changeType, String tableName)
      Gets an instance of change assert corresponding to the index and the type of change. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      changes - The changes
      changeType - Type of the change on which is the instance of change assert.
      tableName - Name of the table on which is the instance of change assert.
      Returns:
      The change assert implementation.
    • getChangeInstance

      public N getChangeInstance(Changes changes, ChangeType changeType, String tableName, int index)
      Gets an instance of change assert corresponding to the index and the type of change. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      changes - The changes
      changeType - Type of the change on which is the instance of change assert.
      tableName - Name of the table on which is the instance of change assert.
      index - Index of the change on which is the instance of change assert.
      Returns:
      The change assert implementation.
    • getChangeInstanceWithPK

      public N getChangeInstanceWithPK(Changes changes, String tableName, Object... pksValues)
      Gets an instance of change assert corresponding to the table and the primary keys. If this instance is already instanced, the method returns it from the cache.
      Parameters:
      changes - The changes
      tableName - Name of the table on which is the instance of change assert.
      pksValues - The values of the primary key corresponding to the Change.
      Returns:
      The change assert implementation.
    • getChangesDescription

      protected abstract String getChangesDescription(ChangeType changeType, String tableName)
      Returns the description.
      Parameters:
      changeType - Type of the change.
      tableName - Name of the table.
      Returns:
      The description
    • getChangeDescription

      protected abstract String getChangeDescription(Changes changes, Change change, int index, ChangeType changeType, String tableName)
      Returns the description.
      Parameters:
      changes - The changes
      change - The change
      index - Index of the value.
      changeType - Type of the change.
      tableName - Name of the table.
      Returns:
      The description