Package org.hibernate.type.descriptor.java

Interface VersionJavaType<T>

    • Method Detail

      • seed

        T seed​(Long length,Integer precision,Integer scale,SharedSessionContractImplementor session)
        Generate an initial version.

        Note that this operation is only used when the program sets a null or negative number as the value of the entity version field. It is not called when the program sets the version field to a sensible-looking version.

        Parameters:
        length - The length of the type
        precision - The precision of the type
        scale - The scale of the type
        session - The session from which this request originates.
        Returns:
        an instance of the type
      • next

        T next​(T current,Long length,Integer precision,Integer scale,SharedSessionContractImplementor session)
        Increment the version.
        Parameters:
        current - the current version
        length - The length of the type
        precision - The precision of the type
        scale - The scale of the type
        session - The session from which this request originates.
        Returns:
        an instance of the type