|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTypeMappingsFactory
public final class TypeMappingsFactory
Currently contains all types of type mappings. Implemented using singleton pattern.
Field Summary | |
---|---|
static int |
TYPE_UNKNOWN
|
Method Summary | |
---|---|
int |
convertStringToSQLType(String type)
Convert a type string to its SQL Type int value. |
Object |
fixNull(Class type)
Returns a primitive legal value as opposed to null if type is primitive. |
static TypeMappingsFactory |
getInstance()
Get an instance of this class. |
int |
getSqlType(Class classType)
Get the SQL type of a class, start at top level class an check all super classes until match is found. |
int |
getSqlType(Object o)
Get the SQL type for an object. |
int |
getTypeId(Class classType)
Get the type id (defined by this class) for the given class. |
Object |
lookupType(Object val,
Object[] args)
|
static Object[] |
toObjectArray(Object o)
Create an Object array for the given array. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_UNKNOWN
Method Detail |
---|
public static TypeMappingsFactory getInstance()
public int convertStringToSQLType(String type)
type
- A String containing the SQL type name.
public int getSqlType(Class classType)
classType
- Class to get SQL type of.
public int getSqlType(Object o)
o
- Object to get SQL type of.
public Object lookupType(Object val, Object[] args) throws IllegalAccessException, InvocationTargetException
val
- args
-
IllegalAccessException
InvocationTargetException
public int getTypeId(Class classType)
classType
- Class to get type of.
public Object fixNull(Class type)
type
- type to get null value for.
public static Object[] toObjectArray(Object o)
o
- An array.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |