Package oracle.kv.table
Interface TimestampValue
- All Superinterfaces:
- Comparable<FieldValue>,- FieldValue
TimestampValue extends 
FieldValue to represent a Timestamp value.- Since:
- 4.3
- 
Method SummaryModifier and TypeMethodDescriptionclone()Create a deep copy of this object.get()Get the Timestamp value of this object.intgetDay()Returns the day of the Timestamp represented by this TimestampValue object.intReturns the fractional seconds of the Timestamp represented by this TimestampValue object.intgetHour()Returns the hour of the Timestamp represented by this TimestampValue object.intReturns the minute of the Timestamp represented by this TimestampValue object.intgetMonth()Returns the month of the Timestamp represented by this TimestampValue object.intgetNano()Returns the nanoseconds of the Timestamp represented by this TimestampValue object.intReturns the second of the Timestamp represented by this TimestampValue object.intgetYear()Returns the year of the Timestamp represented by this TimestampValue object.toString()Formats the Timestamp value to a string with the default patternTimestampDef.DEFAULT_PATTERNin UTC zone.Formats the Timestamp value to a string with the specified pattern.Methods inherited from interface java.lang.ComparablecompareToMethods inherited from interface oracle.kv.table.FieldValueasArray, asBinary, asBoolean, asDouble, asEnum, asFixedBinary, asFloat, asIndexKey, asInteger, asLong, asMap, asNumber, asPrimaryKey, asRecord, asRow, asString, asTimestamp, getDefinition, getType, isArray, isAtomic, isBinary, isBoolean, isComplex, isDouble, isEMPTY, isEnum, isFixedBinary, isFloat, isIndexKey, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isPrimaryKey, isRecord, isRow, isString, isTimestamp, toJsonString
- 
Method Details- 
getTimestamp get()Get the Timestamp value of this object.- Returns:
- the Timestamp value
 
- 
cloneTimestampValue clone()Create a deep copy of this object.- Specified by:
- clonein interface- FieldValue
- Returns:
- a deep copy of this object
 
- 
toStringString toString()Formats the Timestamp value to a string with the default patternTimestampDef.DEFAULT_PATTERNin UTC zone.- Overrides:
- toStringin class- Object
- Returns:
- the formatted string
- Throws:
- IllegalArgumentException- if failed to format the Timestamp value to a string with default pattern.
 
- 
toStringFormats the Timestamp value to a string with the specified pattern.- Parameters:
- pattern- the pattern for the timestampString. If null, then default pattern- TimestampDef.DEFAULT_PATTERNis 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:
- IllegalArgumentException- if failed to format the Timestamp value to a string in format of given pattern.
 
- 
getYearint getYear()Returns the year of the Timestamp represented by this TimestampValue object.- Returns:
- the year
 
- 
getMonthint getMonth()Returns the month of the Timestamp represented by this TimestampValue object.- Returns:
- the month
 
- 
getDayint getDay()Returns the day of the Timestamp represented by this TimestampValue object.- Returns:
- the day
 
- 
getHourint getHour()Returns the hour of the Timestamp represented by this TimestampValue object.- Returns:
- the hour
 
- 
getMinuteint getMinute()Returns the minute of the Timestamp represented by this TimestampValue object.- Returns:
- the minute
 
- 
getSecondint getSecond()Returns the second of the Timestamp represented by this TimestampValue object.- Returns:
- the second
 
- 
getNanoint getNano()Returns the nanoseconds of the Timestamp represented by this TimestampValue object.- Returns:
- the nanoseconds
 
- 
getFracSecondint 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.
 
 
-