Package org.oddjob.sql
Class ColumnExtractor<T>
java.lang.Object
org.oddjob.sql.ColumnExtractor<T>
Something that is able to extract a value from a column based on the
SQL Type.
- Author:
- rob
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ColumnExtractor<BigDecimal> static final ColumnExtractor<Boolean> static final ColumnExtractor<Date> static final ColumnExtractor<Object> static final ColumnExtractor<Double> static final ColumnExtractor<Integer> static final ColumnExtractor<Long> static final ColumnExtractor<Short> static final ColumnExtractor<String> static final ColumnExtractor<Time> static final ColumnExtractor<Timestamp> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TExtract the value from the column.static <X> ColumnExtractor<X> getColumnExtractor(Integer sqlType) getType()Get the class of this Column Extractor.
-
Field Details
-
SQL_TYPE_NAMES
-
BOOLEAN_EXTRACTOR
-
SHORT_EXTRACTOR
-
INT_EXTRACTOR
-
LONG_EXTRACTOR
-
DOUBLE_EXTRACTOR
-
BIG_DECIMAL_EXTRACTOR
-
STRING_EXTRACTOR
-
DATE_EXTRACTOR
-
TIME_EXTRACTOR
-
TIMESTAMP_EXTRACTOR
-
DEFAULT_EXTRACTOR
-
-
Constructor Details
-
ColumnExtractor
public ColumnExtractor()
-
-
Method Details
-
getColumnExtractor
-
getType
Get the class of this Column Extractor.- Returns:
- The class, never null.
-
extract
Extract the value from the column.- Parameters:
rs-columnIndex-- Returns:
- Throws:
SQLException
-