Class UserTypeVersionJavaTypeWrapper<J>

    • Constructor Detail

      • UserTypeVersionJavaTypeWrapper

        public UserTypeVersionJavaTypeWrapper​(UserVersionType<J> userType)
    • Method Detail

      • seed

        public J seed​(Long length,
                      Integer precision,
                      Integer scale,
                      SharedSessionContractImplementor session)
        Description copied from interface: VersionJavaType
        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.

        Specified by:
        seed in interface VersionJavaType<J>
        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

        public J next​(J current,
                      Long length,
                      Integer precision,
                      Integer scale,
                      SharedSessionContractImplementor session)
        Description copied from interface: VersionJavaType
        Increment the version.
        Specified by:
        next in interface VersionJavaType<J>
        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