Class Jdbc3Utils
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.util.Jdbc3Utils
Little helper class providing functions for dealing with the newer JDBC functionality
in a way that is safe to compile with Java 1.3.
- Version:
- $Revision: 289996 $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Determines the type code for the BOOLEAN JDBC type.static int
Determines the type code for the DATALINK JDBC type.static String
getBatchResultMessage
(String tableName, int rowIdx, int resultCode) Returns the logging message corresponding to the given result code of a batch message.static boolean
Determines whether the system supports the Java 1.4 batch result codes.static boolean
Determines whether the system supports the Java 1.4 JDBC Types, DATALINK and BOOLEAN.
-
Constructor Details
-
Jdbc3Utils
public Jdbc3Utils()
-
-
Method Details
-
supportsJava14JdbcTypes
public static boolean supportsJava14JdbcTypes()Determines whether the system supports the Java 1.4 JDBC Types, DATALINK and BOOLEAN.- Returns:
true
if BOOLEAN and DATALINK are available
-
determineBooleanTypeCode
Determines the type code for the BOOLEAN JDBC type.- Returns:
- The type code
- Throws:
UnsupportedOperationException
- If the BOOLEAN type is not supported
-
determineDatalinkTypeCode
Determines the type code for the DATALINK JDBC type.- Returns:
- The type code
- Throws:
UnsupportedOperationException
- If the DATALINK type is not supported
-
supportsJava14BatchResultCodes
public static boolean supportsJava14BatchResultCodes()Determines whether the system supports the Java 1.4 batch result codes.- Returns:
true
if SUCCESS_NO_INFO and EXECUTE_FAILED are available in theStatement
class
-
getBatchResultMessage
Returns the logging message corresponding to the given result code of a batch message. Note that these code values are only available in JDBC 3 and newer (seeStatement
for details).- Parameters:
tableName
- The name of the table that the batch update/insert was performed onrowIdx
- The index of the row within the batch for which this code isresultCode
- The code- Returns:
- The string message or
null
if the code does not indicate an error
-