| java.lang.Object org.apache.derbyTesting.functionTests.util.BigDecimalHandler
BigDecimalHandler | public class BigDecimalHandler (Code) | | BigDecimalHandler provides wrappers for JDBC API methods which use BigDecimal.
When writing tests which use BigDecimal, the methods in this class can be called
instead of directly calling JDBC methods. This way the same test can be used in JVMs
like J2ME/CDC/Foundation Profile, which do not have BigDecimal class.
author: deepa |
Method Summary | |
protected static boolean | canConvertToDecimal(int type) | public static String | getBigDecimalString(ResultSet rs, int columnIndex) This method is a wrapper for the ResultSet method getBigDecimal(int columnIndex). | public static String | getBigDecimalString(ResultSet rs, String columnName, int columnIndex) This method is a wrapper for ResultSet method getBigDecimal(String columnName). | public static String | getBigDecimalString(CallableStatement cs, int parameterIndex, int parameterType) This method is a wrapper for the CallableStatement method getBigDecimal(int parameterIndex). | public static String | getObjectString(ResultSet rs, int columnIndex) | public static String | getObjectString(ResultSet rs, String columnName, int columnIndex) | public static void | setBigDecimalString(PreparedStatement ps, int parameterIndex, String bdString) | public static void | setObjectString(PreparedStatement ps, int parameterIndex, String objectString) | public static void | updateBigDecimalString(ResultSet rs, int columnIndex, String bdString) | public static void | updateBigDecimalString(ResultSet rs, String columnName, String bdString) |
BIGDECIMAL_REPRESENTATION | final public static int BIGDECIMAL_REPRESENTATION(Code) | | |
STRING_REPRESENTATION | final public static int STRING_REPRESENTATION(Code) | | |
representation | public static int representation(Code) | | |
canConvertToDecimal | protected static boolean canConvertToDecimal(int type) throws SQLException(Code) | | This method checks that the SQL type can be converted to Decimal
Parameters: rs - ResultSet Parameters: columnIndex - Column Index true if the SQL type is convertible to DECIMAL, false otherwise. throws: SQLException - |
getBigDecimalString | public static String getBigDecimalString(ResultSet rs, int columnIndex) throws SQLException(Code) | | This method is a wrapper for the ResultSet method getBigDecimal(int columnIndex).
Parameters: rs - ResultSet Parameters: columnIndex - Column Index String value of getXXX(columnIndex)method on the ResultSet throws: SQLException - |
getBigDecimalString | public static String getBigDecimalString(ResultSet rs, String columnName, int columnIndex) throws SQLException(Code) | | This method is a wrapper for ResultSet method getBigDecimal(String columnName).
Parameters: rs - ResultSet Parameters: columnName - Column Name Parameters: columnIndex - Coulumn Index String value of getXXX(columnName)method on the ResultSet throws: SQLException - |
getBigDecimalString | public static String getBigDecimalString(CallableStatement cs, int parameterIndex, int parameterType) throws SQLException(Code) | | This method is a wrapper for the CallableStatement method getBigDecimal(int parameterIndex).
The wrapper method needs the parameterType as an input since ParameterMetaData is not available in JSR169.
Parameters: cs - CallableStatement Parameters: parameterIndex - Parameter Index Parameters: parameterType - Parameter Type String value of getXXX(parameterIndex)method on the CallableStatement throws: SQLException - |
getObjectString | public static String getObjectString(ResultSet rs, int columnIndex) throws SQLException(Code) | | This method is a wrapper for ResultSet method getObject(int columnIndex)
Parameters: rs - ResultSet Parameters: columnIndex - ColumnIndex String value of getXXX(columnIndex) method on the ResultSet throws: SQLException - |
getObjectString | public static String getObjectString(ResultSet rs, String columnName, int columnIndex) throws SQLException(Code) | | This method is a wrapper for ResultSet method getObject(String columnName)
Parameters: rs - ResultSet Parameters: columnName - Column Name Parameters: columnIndex - Column Index String value of getXXX(columnName) method on the ResultSet throws: SQLException - |
setBigDecimalString | public static void setBigDecimalString(PreparedStatement ps, int parameterIndex, String bdString) throws SQLException(Code) | | This method is a wrapper for the PreparedStatement method setBigDecimal(int parameterIndex,BigDecimal x)
Parameters: ps - PreparedStatement Parameters: parameterIndex - Parameter Index Parameters: bdString - String to be used in setXXX method throws: SQLException - |
setObjectString | public static void setObjectString(PreparedStatement ps, int parameterIndex, String objectString) throws SQLException(Code) | | This method is a wrapper for the PreparedStatement method setObject(int parameterIndex, Object x)
Parameters: ps - PreparedStatement Parameters: parameterIndex - Parameter Index Parameters: bdString - String to be used in setObject method throws: SQLException - |
updateBigDecimalString | public static void updateBigDecimalString(ResultSet rs, int columnIndex, String bdString) throws SQLException(Code) | | This method is a wrapper for ResultSet method
updateBigDecimal(int columnIndex, BigDecimal x)
Parameters: rs - ResultSet Parameters: columnIndex - Column Index Parameters: bdString - String to be used in updateXXX method throws: SQLException - |
updateBigDecimalString | public static void updateBigDecimalString(ResultSet rs, String columnName, String bdString) throws SQLException(Code) | | This method is a wrapper for ResultSet method
updateBigDecimal(String columnName, BigDecimal x)
Parameters: rs - ResultSet Parameters: columnName - Column Name Parameters: bdString - String to be used in updateXXX method throws: SQLException - |
|
|