Interface TimestampValue

    • Method Detail

      • get

        java.sql.Timestamp get()
        Get the Timestamp value of this object.
        Returns:
        the Timestamp value
      • clone

        TimestampValue clone()
        Create a deep copy of this object.
        Specified by:
        clone in interface FieldValue
        Returns:
        a deep copy of this object
      • toString

        java.lang.String toString()
        Formats the Timestamp value to a string with the default pattern TimestampDef.DEFAULT_PATTERN in UTC zone.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the formatted string
        Throws:
        java.lang.IllegalArgumentException - if failed to format the Timestamp value to a string with default pattern.
      • toString

        java.lang.String toString​(java.lang.String pattern,
                                  boolean withZoneUTC)
        Formats the Timestamp value to a string with the specified pattern.
        Parameters:
        pattern - the pattern for the timestampString. If null, then default pattern TimestampDef.DEFAULT_PATTERN is used to format to a string. The symbols that can be used to specify a pattern are described in DateTimeFormatter.
        withZoneUTC - true if use UTC zone, otherwise the local time zone is used.
        Returns:
        the formatted string
        Throws:
        java.lang.IllegalArgumentException - if failed to format the Timestamp value to a string in format of given pattern.
      • getYear

        int getYear()
        Returns the year of the Timestamp represented by this TimestampValue object.
        Returns:
        the year
      • getMonth

        int getMonth()
        Returns the month of the Timestamp represented by this TimestampValue object.
        Returns:
        the month
      • getDay

        int getDay()
        Returns the day of the Timestamp represented by this TimestampValue object.
        Returns:
        the day
      • getHour

        int getHour()
        Returns the hour of the Timestamp represented by this TimestampValue object.
        Returns:
        the hour
      • getMinute

        int getMinute()
        Returns the minute of the Timestamp represented by this TimestampValue object.
        Returns:
        the minute
      • getSecond

        int getSecond()
        Returns the second of the Timestamp represented by this TimestampValue object.
        Returns:
        the second
      • getNano

        int getNano()
        Returns the nanoseconds of the Timestamp represented by this TimestampValue object.
        Returns:
        the nanoseconds
      • getFracSecond

        int getFracSecond()
        Returns the fractional seconds of the Timestamp represented by this TimestampValue object. The range of the number returned depends on the precision of the timestamp value. For example, if the precision is 3 (milli seconds), the number will be between 0 and 999. If the precision is 0, the returned number will always be 0.
        Returns:
        the fractional seconds.