public final class TypeHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.Class<?>,java.lang.Integer> |
types
Map of P2J types to SQL types
|
Constructor and Description |
---|
TypeHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
getP2JType(int sqlType)
Get the P2J wrapper type for the given SQL type code.
|
static int |
getSqlType(java.lang.Class<?> wrapperType)
Get the SQL type code for the given P2J wrapper type.
|
private static final java.util.Map<java.lang.Class<?>,java.lang.Integer> types
public static int getSqlType(java.lang.Class<?> wrapperType)
wrapperType
- P2J typejava.lang.IllegalArgumentException
- if wrapperType
is not recognized.public static java.lang.Class<?> getP2JType(int sqlType)
4GL type name | P2J wrapper for 4GL types | SQL type |
---|---|---|
character | character |
Types.VARCHAR |
datetime-tz | datetimetz |
n/a |
datetime | datetime |
Types.TIMESTAMP |
date | date |
Types.DATE |
decimal | decimal |
Types.NUMERIC |
handle | handle |
n/a |
int64 | int64 |
Types.BIGINT |
integer | integer |
Types.INTEGER |
logical | logical |
Types.BIT |
raw | raw |
Types.VARBINARY |
rowid | rowid |
n/a |
recid | recid |
n/a |
sqlType
- SQL type code.null
if no match.