Package com.illumon.iris.utils
Class JdbcTypeMapper.Context
java.lang.Object
com.illumon.iris.utils.JdbcTypeMapper.Context
- Enclosing class:
- JdbcTypeMapper
public static class JdbcTypeMapper.Context extends Object
A catch-all bucket for settings used when converting Deephaven column values to and from JDBC values.
Storing per-import and per-session information here instead of in the mappers allows the mappers to remain
static singletons.
-
Method Summary
Modifier and Type Method Description String
getArrayDelimiter()
Get the array delimiter to use when encoding/decoding arrays as String values.*Calendar
getSourceCalendar()
Get the calendar to use when interpreting local date/time values.boolean
isStrict()
Get the strict setting.static JdbcTypeMapper.Context
of(Calendar calendar)
Create a new context with the given Calendar.static JdbcTypeMapper.Context
of(TimeZone sourceTimeZone, String arrayDelimiter, boolean strict)
Create a new context with the given settings.
-
Method Details
-
of
public static JdbcTypeMapper.Context of(TimeZone sourceTimeZone, String arrayDelimiter, boolean strict)Create a new context with the given settings.- Parameters:
sourceTimeZone
- necessary when dealing with many date/time related operations.arrayDelimiter
- necessary when encoding/decoding arrays as stringsstrict
- indicates how forgiving to be with malformed/unexpected input data
-
of
Create a new context with the given Calendar. Array delimiter will default to a comma, and strict true.- Parameters:
calendar
- necessary when dealing with many date/time related operations.
-
getSourceCalendar
Get the calendar to use when interpreting local date/time values.- Returns:
- the calendar
-
getArrayDelimiter
Get the array delimiter to use when encoding/decoding arrays as String values.*- Returns:
- the delimiter
-
isStrict
public boolean isStrict()Get the strict setting.- Returns:
- if conversions should be strict
-