|
jxUtil 0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourceforge.jxutil.sql.SQLUtil
Utility functions for JDBC access.
Nested Class Summary | |
static class |
SQLUtil.TypeInfoRow
|
Field Summary | |
(package private) static Map |
nameTypeMap
|
(package private) static Map |
typeNameMap
|
Constructor Summary | |
private |
SQLUtil()
Cannot instantiate. |
Method Summary | |
static String |
expandSQLState(String sqlState)
|
static Class[] |
getClasses(ResultSetMetaData meta)
Get the column classes of a ResultSet. |
static Class |
getClassFromType(int type)
Map JDBC Types to Java Types. |
static String[] |
getHeader(ResultSetMetaData meta)
Get the column names of a ResultSet. |
static String |
getName(int type)
Get the String name of a java.sql.Types typecode. |
static Class |
getOClassFromType(int type)
Map JDBC Types to Java Object Types. |
static String |
getTransactionName(int transaction)
Get the literal String for a transaction code. |
static int |
getType(String name)
Get the java.sql.Types typecode given the name. |
static int[] |
getTypeFromClass(Class cl)
Map Java Types to JDBC Types. |
static int[] |
getTypeFromOClass(Class cl)
Map Java Object Types to JDBC Types. |
static String |
makeLiteral(Object obj)
|
static Object[][] |
rs2Array(ResultSet set,
boolean header)
Fetch the data from a ResultSet in an array of Object. |
static Object[] |
rs2Array2(ResultSet set)
Make arrays of column names, column classes and data from a ResultSet. |
static Collection |
rs2Collection(ResultSet set,
boolean header,
int col)
Make a collection out of the values of one column of a ResultSet. |
static Map |
rs2Map(ResultSet set)
Return a one-row ResultSet as a Map. |
static Map |
rs2Map(ResultSet set,
int keyRow,
int valRow)
Return two columns of a ResultSet as a Map |
static Map |
rs2Map12(ResultSet set)
Return the first two columns of a ResultSet as a Map |
static String[][] |
rs2StringArray(ResultSet set,
boolean header)
Fetch the data from a ResultSet into an array of String. |
static String[] |
rs2StringArray(ResultSet set,
boolean header,
int col)
Make an array of Strings out of the values of one column of a ResultSet. |
static Collection |
rs2StringCollection(ResultSet set,
boolean header,
int col)
Make a collection out of the values retrieved as String of one column of a ResultSet. |
static void |
RSRow2Object(ResultSet set,
Object obj)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Map nameTypeMap
static Map typeNameMap
Constructor Detail |
private SQLUtil()
Method Detail |
public static String expandSQLState(String sqlState)
public static Class[] getClasses(ResultSetMetaData meta) throws SQLException
SQLException
public static Class getClassFromType(int type) throws SQLException
SQLException
Types
public static String[] getHeader(ResultSetMetaData meta) throws SQLException
SQLException
public static String getName(int type)
public static Class getOClassFromType(int type) throws SQLException
SQLException
Types
public static String getTransactionName(int transaction)
public static int getType(String name)
public static int[] getTypeFromClass(Class cl) throws SQLException
SQLException
Types
public static int[] getTypeFromOClass(Class cl) throws SQLException
SQLException
Types
public static String makeLiteral(Object obj)
public static Object[][] rs2Array(ResultSet set, boolean header) throws SQLException
SQLException
public static Object[] rs2Array2(ResultSet set) throws SQLException
SQLException
public static Collection rs2Collection(ResultSet set, boolean header, int col) throws SQLException
SQLException
public static Map rs2Map(ResultSet set) throws SQLException
SQLException
public static Map rs2Map(ResultSet set, int keyRow, int valRow) throws SQLException
SQLException
public static Map rs2Map12(ResultSet set) throws SQLException
SQLException
public static String[][] rs2StringArray(ResultSet set, boolean header) throws SQLException
SQLException
public static String[] rs2StringArray(ResultSet set, boolean header, int col) throws SQLException
SQLException
public static Collection rs2StringCollection(ResultSet set, boolean header, int col) throws SQLException
SQLException
public static void RSRow2Object(ResultSet set, Object obj) throws SQLException
SQLException
|
jxUtil 0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |