Class ByteColumnHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.columns.ByteColumnHandler
-
- All Implemented Interfaces:
ColumnHandler<Byte>
public class ByteColumnHandler extends Object implements ColumnHandler<Byte>
-
-
Constructor Summary
Constructors Constructor Description ByteColumnHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Byteapply(ResultSet resultSet, int columnIndex)Retrieves the current row's column value from aResultSetand stores it into an instance ofpropType.booleanmatch(Class<?> propType)Tests whether to handle a column targeted for a value type matchingpropType.
-
-
-
Constructor Detail
-
ByteColumnHandler
public ByteColumnHandler()
-
-
Method Detail
-
apply
public Byte apply(ResultSet resultSet, int columnIndex) throws SQLException
Description copied from interface:ColumnHandlerRetrieves the current row's column value from aResultSetand stores it into an instance ofpropType. This method is only called ifColumnHandler.match(Class)returns true.- Specified by:
applyin interfaceColumnHandler<Byte>- Parameters:
resultSet- The source result set. This must be on the correct row.columnIndex- The position of the column to retrieve, a 1-based index.- Returns:
- The converted value or the original value if something doesn't work out.
- Throws:
SQLException- if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
-
match
public boolean match(Class<?> propType)
Description copied from interface:ColumnHandlerTests whether to handle a column targeted for a value type matchingpropType.- Specified by:
matchin interfaceColumnHandler<Byte>- Parameters:
propType- The type of the target parameter.- Returns:
- true is this property handler handles this
propType; false otherwise.
-
-