Class LocalDateTimeType

    • Field Detail

      • FORMATTER

        public static final java.time.format.DateTimeFormatter FORMATTER
    • Constructor Detail

      • LocalDateTimeType

        public LocalDateTimeType()
    • 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
      • objectToSQLString

        public java.lang.String objectToSQLString​(java.time.LocalDateTime 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.time.LocalDateTime>
        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.
      • seed

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

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

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