Interface UnsavedValueStrategy

  • All Known Implementing Classes:
    IdentifierValue, VersionValue

    public interface UnsavedValueStrategy
    The base contract for determining transient status versus detached status.
    • Method Detail

      • isUnsaved

        @Nullable Boolean isUnsaved​(@Nullable Object test)
        Make the transient/detached determination
        test - The value to be tested
        true indicates the value corresponds to unsaved data (aka, transient state); false indicates the value does not corresponds to unsaved data (aka, detached state); null indicates that this strategy was not able to determine conclusively.
      • getDefaultValue

        @Nullable Object getDefaultValue​(@Nullable Object currentValue)
        Get a default value meant to indicate transience.
        currentValue - The current state value.
        The default transience value.