|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.metadata.JdbcTypesHelper
public class JdbcTypesHelper
Helper class which provide all supported JdbcType classes
(based on the Types) as inner classes.
JdbcType| Constructor Summary | |
|---|---|
JdbcTypesHelper()
|
|
| Method Summary | |
|---|---|
static JdbcType |
getJdbcTypeByName(String typeName)
Lookup the JdbcType by name. |
static JdbcType |
getJdbcTypeByReflection(String fieldType)
Try to automatically assign a jdbc type for the given java type name. |
static JdbcType |
getJdbcTypeByTypesIndex(Integer type)
Return the JdbcType for the given jdbc type. |
static Object |
getObjectFromColumn(ResultSet rs,
Integer jdbcType,
int columnId)
Returns an java object read from the specified ResultSet column. |
static String |
getSqlTypeAsString(int jdbcType)
Returns a string representation of the given Types value. |
static void |
setJdbcType(String typeName,
int typeIndex,
JdbcType type)
Set the JdbcType by name and index. |
static void |
setJdbcTypeByName(String typeName,
JdbcType type)
Set the JdbcType by name. |
static void |
setJdbcTypeByTypesIndex(int typeIndex,
JdbcType type)
Set the JdbcType by index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcTypesHelper()
| Method Detail |
|---|
public static void setJdbcType(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(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(String typeName)
JdbcType by name. If name was not found an exception
is thrown.
public static void setJdbcTypeByName(String typeName,
JdbcType type)
JdbcType by name.
typeName - Name of the typetype - the typepublic static JdbcType getJdbcTypeByReflection(String fieldType)
FieldDescriptor.getJdbcType()
public static Object getObjectFromColumn(ResultSet rs,
Integer jdbcType,
int columnId)
throws SQLException
SQLExceptionpublic static String getSqlTypeAsString(int jdbcType)
Types value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||