public class TypeMappers
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static TypeMapper |
DALI |
TypeMapper implementation like
STANDARD , but which uses
a 'T' character as the separator between the date and time parts
of timestamp serializations. |
static TypeMapper |
IDENTITY |
TypeMapper implementation which performs no conversions.
|
static TypeMapper |
STANDARD |
TypeMapper implementation which performs generally useful conversions.
|
Modifier and Type | Method | Description |
---|---|---|
static ValueHandler |
createIdentityValueHandler(java.sql.ResultSetMetaData meta,
int jcol1) |
Constructs a new ValueHandler which performs no conversions.
|
static ValueHandler |
createStringValueHandler(java.sql.ResultSetMetaData meta,
int jcol1) |
Constructs a new ValueHandler which converts values to Strings.
|
static ValueHandler |
createTimestampValueHandler(java.sql.ResultSetMetaData meta,
int jcol1,
char dateTimeSeparator) |
Constructs a new ValueHandler which converts JDBC Timestamp
values to Strings, with a configurable date/time separator character.
|
public static final TypeMapper STANDARD
Date
subclasses (including
java.sql.Date
, java.sql.Time
and
java.sql.Timestamp
are turned into Strings,
using JDBC timestamp escape format (which is ISO-8601 with a space
character separating date and time).
The intention is that by using this implementation you will get
an output table which can be written using non-specialist output
formats such as FITS and VOTable.public static final TypeMapper DALI
STANDARD
, but which uses
a 'T' character as the separator between the date and time parts
of timestamp serializations. Use of the 'T' separator is
mandated by the Data Access Layer Interface standard v1.0,
section 3.1.2 (http://www.ivoa.net/documents/DALI/), and so is
appropriate for output from VO services such as TAP.public static final TypeMapper IDENTITY
public static ValueHandler createIdentityValueHandler(java.sql.ResultSetMetaData meta, int jcol1) throws java.sql.SQLException
meta
- JDBC metadata objectjcol1
- JDBC column index (first column is 1)java.sql.SQLException
public static ValueHandler createStringValueHandler(java.sql.ResultSetMetaData meta, int jcol1) throws java.sql.SQLException
meta
- JDBC metadata objectjcol1
- JDBC column index (first column is 1)java.sql.SQLException
public static ValueHandler createTimestampValueHandler(java.sql.ResultSetMetaData meta, int jcol1, char dateTimeSeparator) throws java.sql.SQLException
Timestamp
.meta
- JDBC metadata objectjcol1
- JDBC column index (first column is 1)dateTimeSeparator
- separator character between
date and time parts of ISO-8601 string;
usually either ' ' or 'T'java.sql.SQLException
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.