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 StringgetArrayDelimiter()Get the array delimiter to use when encoding/decoding arrays as String values.*CalendargetSourceCalendar()Get the calendar to use when interpreting local date/time values.booleanisStrict()Get the strict setting.static JdbcTypeMapper.Contextof(Calendar calendar)Create a new context with the given Calendar.static JdbcTypeMapper.Contextof(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
-