public class JdbcTypesHelper
extends java.lang.Object
JdbcType
classes
(based on the Types
) as inner classes.JdbcType
Constructor and Description |
---|
JdbcTypesHelper() |
Modifier and Type | Method and Description |
---|---|
static JdbcType |
getJdbcTypeByName(java.lang.String typeName)
Lookup the
JdbcType by name. |
static JdbcType |
getJdbcTypeByReflection(java.lang.String fieldType)
Try to automatically assign a jdbc type for the given
java type name.
|
static JdbcType |
getJdbcTypeByTypesIndex(java.lang.Integer type)
Return the
JdbcType for the given jdbc type . |
static java.lang.Object |
getObjectFromColumn(java.sql.ResultSet rs,
java.lang.Integer jdbcType,
int columnId)
Returns an java object read from the specified ResultSet column.
|
static java.lang.String |
getSqlTypeAsString(int jdbcType)
Returns a string representation of the given
Types value. |
static void |
setJdbcType(java.lang.String typeName,
int typeIndex,
JdbcType type)
Set the
JdbcType by name and index. |
static void |
setJdbcTypeByName(java.lang.String typeName,
JdbcType type)
Set the
JdbcType by name. |
static void |
setJdbcTypeByTypesIndex(int typeIndex,
JdbcType type)
Set the
JdbcType by index. |
public static void setJdbcType(java.lang.String typeName, int typeIndex, JdbcType type)
JdbcType
by name and index.typeName
- Name of the typetypeIndex
- index of the typetype
- the typepublic static JdbcType getJdbcTypeByTypesIndex(java.lang.Integer type)
JdbcType
for the given jdbc type
.public static void setJdbcTypeByTypesIndex(int typeIndex, JdbcType type)
JdbcType
by index.typeIndex
- index of the typetype
- the typepublic static JdbcType getJdbcTypeByName(java.lang.String typeName)
JdbcType
by name. If name was not found an exception
is thrown.public static void setJdbcTypeByName(java.lang.String typeName, JdbcType type)
JdbcType
by name.typeName
- Name of the typetype
- the typepublic static JdbcType getJdbcTypeByReflection(java.lang.String fieldType)
FieldDescriptor.getJdbcType()
public static java.lang.Object getObjectFromColumn(java.sql.ResultSet rs, java.lang.Integer jdbcType, int columnId) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getSqlTypeAsString(int jdbcType)
Types
value.(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30