Class ShortColumnHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.columns.ShortColumnHandler
-
- All Implemented Interfaces:
ColumnHandler
public class ShortColumnHandler extends java.lang.Object implements ColumnHandler
-
-
Constructor Summary
Constructors Constructor Description ShortColumnHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectapply(java.sql.ResultSet rs, int columnIndex)Do the work required to retrieve and store a column fromResultSetinto something of typepropType.booleanmatch(java.lang.Class<?> propType)Test whether thisColumnHandlerwants to handle a column targeted for a value type matchingpropType.
-
-
-
Method Detail
-
match
public boolean match(java.lang.Class<?> propType)
Description copied from interface:ColumnHandlerTest whether thisColumnHandlerwants to handle a column targeted for a value type matchingpropType.- Specified by:
matchin interfaceColumnHandler- Parameters:
propType- The type of the target parameter.- Returns:
- true is this property handler can/wants to handle this value; false otherwise.
-
apply
public java.lang.Object apply(java.sql.ResultSet rs, int columnIndex) throws java.sql.SQLExceptionDescription copied from interface:ColumnHandlerDo the work required to retrieve and store a column fromResultSetinto something of typepropType. This method is called only if this handler respondedtrueafter a call toColumnHandler.match(Class).- Specified by:
applyin interfaceColumnHandler- Parameters:
rs- The result set to get data from. This should be moved to the correct row already.columnIndex- The position of the column to retrieve.- Returns:
- The converted value or the original value if something doesn't work out.
- Throws:
java.sql.SQLException- if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
-
-