public class TimeZoneDatatypeCoder
extends java.lang.Object
TIME WITH TIME ZONE
and TIMESTAMP WITH TIME ZONE
.
As this uses Java 8 and higher types, this is not part of datatype coder itself.
Modifier and Type | Class and Description |
---|---|
static interface |
TimeZoneDatatypeCoder.TimeZoneCodec
Simpler API for encoding or decoding offset date times.
|
Constructor and Description |
---|
TimeZoneDatatypeCoder(DatatypeCoder datatypeCoder)
Initializes a time zone datatype coder.
|
Modifier and Type | Method and Description |
---|---|
java.time.OffsetDateTime |
decodeExTimestampTz(byte[] exTimestampTzBytes) |
java.time.OffsetTime |
decodeExTimeTz(byte[] exTimeTzBytes) |
java.time.OffsetDateTime |
decodeTimestampTz(byte[] timestampTzBytes) |
java.time.OffsetTime |
decodeTimeTz(byte[] timeTzBytes) |
byte[] |
encodeExTimestampTz(java.time.OffsetDateTime offsetDateTime) |
byte[] |
encodeExTimeTz(java.time.OffsetTime offsetTime) |
byte[] |
encodeTimestampTz(java.time.OffsetDateTime offsetDateTime) |
byte[] |
encodeTimeTz(java.time.OffsetTime offsetTime) |
static TimeZoneDatatypeCoder |
getInstanceFor(DatatypeCoder datatypeCoder)
Gets or creates an instance of time zone datatype coder for a datatype coder.
|
TimeZoneDatatypeCoder.TimeZoneCodec |
getTimeZoneCodecFor(FieldDescriptor fieldDescriptor)
Obtains the
TimeZoneDatatypeCoder.TimeZoneCodec implementation for the field described by fieldDescriptor . |
public TimeZoneDatatypeCoder(DatatypeCoder datatypeCoder)
datatypeCoder
- datatype coderpublic TimeZoneDatatypeCoder.TimeZoneCodec getTimeZoneCodecFor(FieldDescriptor fieldDescriptor) throws java.sql.SQLException
TimeZoneDatatypeCoder.TimeZoneCodec
implementation for the field described by fieldDescriptor
.fieldDescriptor
- Field descriptorTimeZoneCodec
java.sql.SQLException
- When fieldDescriptor
is not a TIME/TIMESTAMP WITH TIME ZONE type fieldpublic java.time.OffsetDateTime decodeTimestampTz(byte[] timestampTzBytes)
public java.time.OffsetDateTime decodeExTimestampTz(byte[] exTimestampTzBytes)
public byte[] encodeTimestampTz(java.time.OffsetDateTime offsetDateTime)
public byte[] encodeExTimestampTz(java.time.OffsetDateTime offsetDateTime)
public java.time.OffsetTime decodeTimeTz(byte[] timeTzBytes)
public java.time.OffsetTime decodeExTimeTz(byte[] exTimeTzBytes)
public byte[] encodeTimeTz(java.time.OffsetTime offsetTime)
public byte[] encodeExTimeTz(java.time.OffsetTime offsetTime)
public static TimeZoneDatatypeCoder getInstanceFor(DatatypeCoder datatypeCoder)
datatypeCoder
- Datatype coder instanceTimeZoneDatatypeCoder
Copyright © 2001-2020 Jaybird (Firebird JDBC/JCA) team. All rights reserved.