Package nl.b3p.jdbc.util.dbutils
Class LongColumnListHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.AbstractListHandler<Long>
-
- nl.b3p.jdbc.util.dbutils.LongColumnListHandler
-
public class LongColumnListHandler extends org.apache.commons.dbutils.handlers.AbstractListHandler<Long>
Een ListHandler die een list vanLongteruggeeft ipv watdedatabaseverzint. Oracle geeft BigDecimal terug voor identity kolommen van bijv. staging database tabellen omdat het NUMBER(19,0) kolommen zijn.- Author:
- mprins
- See Also:
ColumnListHandler
-
-
Constructor Summary
Constructors Constructor Description LongColumnListHandler()Creates a new instance of ColumnListHandler.LongColumnListHandler(int columnIndex)Creates a new instance of ColumnListHandler.LongColumnListHandler(String columnName)Creates a new instance of ColumnListHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LonghandleRow(ResultSet rs)Returns oneResultSetcolumn value asLong.
-
-
-
Constructor Detail
-
LongColumnListHandler
public LongColumnListHandler()
Creates a new instance of ColumnListHandler. The first column of each row will be returned fromhandle().
-
LongColumnListHandler
public LongColumnListHandler(int columnIndex)
Creates a new instance of ColumnListHandler.- Parameters:
columnIndex- The index of the column to retrieve from theResultSet.
-
LongColumnListHandler
public LongColumnListHandler(String columnName)
Creates a new instance of ColumnListHandler.- Parameters:
columnName- The name of the column to retrieve from theResultSet.
-
-
Method Detail
-
handleRow
protected Long handleRow(ResultSet rs) throws SQLException
Returns oneResultSetcolumn value asLong.- Specified by:
handleRowin classorg.apache.commons.dbutils.handlers.AbstractListHandler<Long>- Parameters:
rs-ResultSetto process.- Returns:
Object, nevernull.- Throws:
SQLException- if a database access error occursClassCastException- if the class datatype does not match the column type- See Also:
AbstractListHandler.handle(ResultSet)
-
-