Class LongType

    • Field Detail

      • INSTANCE

        public static final LongType INSTANCE
    • Constructor Detail

      • LongType

        public LongType()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Type
        Returns the abbreviated name of the type.
        Specified by:
        getName in interface Type
        Returns:
        String the Hibernate type name
      • getDefaultValue

        public java.io.Serializable getDefaultValue()
        Description copied from interface: PrimitiveType
        Get this type's default value.
        Specified by:
        getDefaultValue in interface PrimitiveType<java.lang.Long>
        Returns:
        The default value.
      • stringToObject

        public java.lang.Long stringToObject​(java.lang.String xml)
                                      throws java.lang.Exception
        Description copied from interface: IdentifierType
        Convert the value from the mapping file to a Java object.
        Specified by:
        stringToObject in interface IdentifierType<java.lang.Long>
        Parameters:
        xml - the value of discriminator-value or unsaved-value attribute
        Returns:
        The converted value of the string representation.
        Throws:
        java.lang.Exception - Indicates a problem converting from the string
      • next

        public java.lang.Long next​(java.lang.Long current,
                                   SharedSessionContractImplementor session)
        Description copied from interface: VersionType
        Increment the version.
        Specified by:
        next in interface VersionType<java.lang.Long>
        Parameters:
        current - the current version
        session - The session from which this request originates.
        Returns:
        an instance of the type
      • seed

        public java.lang.Long seed​(SharedSessionContractImplementor session)
        Description copied from interface: VersionType
        Generate an initial version.
        Specified by:
        seed in interface VersionType<java.lang.Long>
        Parameters:
        session - The session from which this request originates.
        Returns:
        an instance of the type
      • getComparator

        public java.util.Comparator<java.lang.Long> getComparator()
        Description copied from interface: VersionType
        Get a comparator for version values.
        Specified by:
        getComparator in interface VersionType<java.lang.Long>
        Returns:
        The comparator to use to compare different version values.
      • objectToSQLString

        public java.lang.String objectToSQLString​(java.lang.Long value,
                                                  Dialect dialect)
                                           throws java.lang.Exception
        Description copied from interface: LiteralType
        Convert the value into a string representation, suitable for embedding in an SQL statement as a literal.
        Specified by:
        objectToSQLString in interface LiteralType<java.lang.Long>
        Parameters:
        value - The value to convert
        dialect - The SQL dialect
        Returns:
        The value's string representation
        Throws:
        java.lang.Exception - Indicates an issue converting the value to literal string.