Interface UserVersionType

  • All Superinterfaces:
    java.util.Comparator, UserType

    public interface UserVersionType
    extends UserType, java.util.Comparator
    A user type that may be used for a version property
    • Method Detail

      • seed

        java.lang.Object seed​(SharedSessionContractImplementor session)
        Generate an initial version.
        Parameters:
        session - The session from which this request originates. May be null; currently this only happens during startup when trying to determine the "unsaved value" of entities.
        Returns:
        an instance of the type
      • next

        java.lang.Object next​(java.lang.Object current,
                              SharedSessionContractImplementor session)
        Increment the version.
        Parameters:
        session - The session from which this request originates.
        current - the current version
        Returns:
        an instance of the type