Package org.tharos.jdbc.swissknife.core
Class SQLTypeMap
- java.lang.Object
-
- org.tharos.jdbc.swissknife.core.SQLTypeMap
-
public class SQLTypeMap extends Object
Utility class for converting database types to Java class types.
-
-
Constructor Summary
Constructors Constructor Description SQLTypeMap()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<Integer,String>getAllJdbcTypeNames()Returns all the jdbc type namesstatic Class<?>toClass(int type)Translates a data type from an integer (java.sql.Types value) to a string that represents the corresponding class.
-
-
-
Method Detail
-
toClass
public static Class<?> toClass(int type)
Translates a data type from an integer (java.sql.Types value) to a string that represents the corresponding class.- Parameters:
type- The java.sql.Types value to convert to its corresponding class.- Returns:
- The class that corresponds to the given java.sql.Types value, or Object.class if the type has no known mapping.
-
getAllJdbcTypeNames
public static Map<Integer,String> getAllJdbcTypeNames() throws IllegalArgumentException, IllegalAccessException
Returns all the jdbc type names- Returns:
- A map representing all jdbc type names
- Throws:
IllegalArgumentExceptionIllegalAccessException
-
-