java.lang.Object
org.firebirdsql.gds.ng.tz.TimeZoneDatatypeCoder
Datatype coder for
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.
- Since:
- 4.0
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Simpler API for encoding or decodingjava.time
types. -
Constructor Summary
ConstructorsConstructorDescriptionTimeZoneDatatypeCoder
(DatatypeCoder datatypeCoder) Initializes a time zone datatype coder. -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeZoneDatatypeCoder
getInstanceFor
(DatatypeCoder datatypeCoder) Gets or creates an instance of time zone datatype coder for a datatype coder.getTimeZoneCodecFor
(int fieldType) Obtains theTimeZoneDatatypeCoder.TimeZoneCodec
implementation for the field with the specified Firebird type.getTimeZoneCodecFor
(FieldDescriptor fieldDescriptor) Obtains theTimeZoneDatatypeCoder.TimeZoneCodec
implementation for the field described byfieldDescriptor
.
-
Constructor Details
-
TimeZoneDatatypeCoder
Initializes a time zone datatype coder.- Parameters:
datatypeCoder
- datatype coder
-
-
Method Details
-
getTimeZoneCodecFor
public TimeZoneDatatypeCoder.TimeZoneCodec getTimeZoneCodecFor(FieldDescriptor fieldDescriptor) throws SQLException Obtains theTimeZoneDatatypeCoder.TimeZoneCodec
implementation for the field described byfieldDescriptor
.- Parameters:
fieldDescriptor
- Field descriptor- Returns:
- Suitable instance of
TimeZoneCodec
- Throws:
SQLException
- WhenfieldDescriptor
is not a TIME/TIMESTAMP WITH TIME ZONE type field- See Also:
-
getTimeZoneCodecFor
Obtains theTimeZoneDatatypeCoder.TimeZoneCodec
implementation for the field with the specified Firebird type.- Parameters:
fieldType
- Firebird type of the field- Returns:
- Suitable instance of
TimeZoneCodec
- Throws:
SQLException
- WhenfieldType
is not a TIME/TIMESTAMP WITH TIME ZONE type
-
getInstanceFor
Gets or creates an instance of time zone datatype coder for a datatype coder.- Parameters:
datatypeCoder
- Datatype coder instance- Returns:
- Cached or new instance of
TimeZoneDatatypeCoder
-