Interface Difference<T>


public interface Difference<T>
A difference between two MT entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Applies the changes to the existing entity if appropriate.
    Returns the existing entity.
    Returns the new entity.
    boolean
    Returns true if the diff is enabled and can be applied.
    boolean
    Returns true if this difference is currently set to keep the existing value in the repository.
    boolean
    Returns true if the (conflicting) difference is resolved and should not be shown to the user.
    void
    setEnabled(boolean enabled)
    Sets the enabled state of the diff.
    void
    setKeepExisting(boolean value)
    Set to true to keep the existing value in the repository, false to update the value from the other entity.
    void
    setResolved(boolean resolved)
    Set to true to mark the difference as resolved.
  • Method Details

    • getExistingEntity

      T getExistingEntity()
      Returns the existing entity.
      Returns:
      The existing entity.
    • getNewEntity

      T getNewEntity()
      Returns the new entity.
      Returns:
      The new entity.
    • isEnabled

      boolean isEnabled()
      Returns true if the diff is enabled and can be applied. The diff could be disabled due to changes made by another diff.
      Returns:
      true if the diff is enabled and can be applied.
    • setEnabled

      void setEnabled(boolean enabled)
      Sets the enabled state of the diff.
      Parameters:
      enabled - The state to set.
    • isKeepExisting

      boolean isKeepExisting()
      Returns true if this difference is currently set to keep the existing value in the repository.
      Returns:
      true if keeping existing value.
    • setKeepExisting

      void setKeepExisting(boolean value)
      Set to true to keep the existing value in the repository, false to update the value from the other entity.
      Parameters:
      value - true to keep the existing value in the repository, false to update the value from the other entity.
    • isResolved

      boolean isResolved()
      Returns true if the (conflicting) difference is resolved and should not be shown to the user.
      Returns:
      true if the (conflicting) difference is resolved and should not be shown to the user.
    • setResolved

      void setResolved(boolean resolved)
      Set to true to mark the difference as resolved.
      Parameters:
      resolved - true to mark the difference as resolved.
    • applyChanges

      void applyChanges()
      Applies the changes to the existing entity if appropriate.