public interface TimestampValue extends FieldValue
FieldValue to represent a Timestamp value.| Modifier and Type | Method and Description |
|---|---|
TimestampValue |
clone()
Create a deep copy of this object.
|
Timestamp |
get()
Get the Timestamp value of this object.
|
int |
getDay()
Returns the day of the Timestamp represented by this TimestampValue
object.
|
int |
getFracSecond()
Returns the fractional seconds of the Timestamp represented by this
TimestampValue object.
|
int |
getHour()
Returns the hour of the Timestamp represented by this TimestampValue
object.
|
int |
getMinute()
Returns the minute of the Timestamp represented by this TimestampValue
object.
|
int |
getMonth()
Returns the month of the Timestamp represented by this TimestampValue
object.
|
int |
getNano()
Returns the nanoseconds of the Timestamp represented by this
TimestampValue object.
|
int |
getSecond()
Returns the second of the Timestamp represented by this TimestampValue
object.
|
int |
getYear()
Returns the year of the Timestamp represented by this TimestampValue
object.
|
String |
toString()
Formats the Timestamp value to a string with the default pattern
TimestampDef.DEFAULT_PATTERN in UTC zone. |
String |
toString(String pattern,
boolean withZoneUTC)
Formats the Timestamp value to a string with the specified pattern.
|
asArray, 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, toJsonStringcompareToTimestamp get()
TimestampValue clone()
clone in interface FieldValueString toString()
TimestampDef.DEFAULT_PATTERN in UTC zone.toString in class ObjectIllegalArgumentException - if failed to format the Timestamp value
to a string with default pattern.String toString(String pattern, boolean withZoneUTC)
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 threetenbp DateTimeFormatter class
DateTimeFormatter.ofPattern(java.lang.String).withZoneUTC - true if use UTC zone, otherwise the local time zone
is used.IllegalArgumentException - if failed to format the Timestamp value
to a string in format of given pattern.int getYear()
int getMonth()
int getDay()
int getHour()
int getMinute()
int getSecond()
int getNano()
int getFracSecond()
Copyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.