Interface IFieldDiff

All Known Implementing Classes:
FieldDiff

public interface IFieldDiff
Object representation of change in one field of IPObject.
Author:
dobisekm
  • Method Details

    • getFieldName

      String getFieldName()
      Returns:
      Name of the dield represented by this diff.
    • isCollection

      boolean isCollection()
      Call this method to determine, whether the getAdded()/getRemoved() (for Collections) or getBefore()/getAfter() (for scalars) method pair is valid.
      Returns:
      the name of the field
    • getBefore

      Object getBefore()
      Returns:
      The field value before (for scalars only).
      Throws:
      UnsupportedOperationException - if isCollection() is true.
    • getAfter

      Object getAfter()
      Returns:
      The field value after (for scalars only).
      Throws:
      UnsupportedOperationException - if isCollection() is true.
    • getAdded

      Collection getAdded()
      Returns:
      Collection of values added into this field's collection Returns Collections.singletonList(getAfter()) for scalar fields.
    • getRemoved

      Collection getRemoved()
      Returns:
      Immutable collection of valued removed from this field's collection. Returns Collections.singletonList(getBefore()) for scalar fields.