|
|||||||||
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(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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcTypesHelper()
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |