Package org.assertj.db.navigation
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 ofAbstractElement
and ofNavigation
).N
- The class of the next position where the navigation go (an sub-class ofAbstractElement
and ofNavigation
).
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
getChangeDescription
(Changes changes, Change change, int index, ChangeType changeType, String tableName) Returns the description.getChangeInstance
(Changes changes, ChangeType changeType, String tableName) Gets an instance of change assert corresponding to the index and the type of change.getChangeInstance
(Changes changes, ChangeType changeType, String tableName, int index) Gets an instance of change assert corresponding to the index and the type of change.getChangeInstanceWithPK
(Changes changes, String tableName, Object... pksValues) Gets an instance of change assert corresponding to the table and the primary keys.protected abstract String
getChangesDescription
(ChangeType changeType, String tableName) Returns the description.getChangesInstance
(Changes changes, ChangeType changeType, String tableName) Gets an instance of changes corresponding to the index and the type of change.
-
Constructor Details
-
PositionWithChanges
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
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 changeschangeType
- 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
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 changeschangeType
- 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
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 changeschangeType
- 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
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 changestableName
- Name of the table on which is the instance of change assert.pksValues
- The values of the primary key corresponding to theChange
.- Returns:
- The change assert implementation.
-
getChangesDescription
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 changeschange
- The changeindex
- Index of the value.changeType
- Type of the change.tableName
- Name of the table.- Returns:
- The description
-