Package org.fugerit.java.core.db.dao.rse
Class SingleColumnRSE<K>
- java.lang.Object
-
- org.fugerit.java.core.db.dao.rse.SingleColumnRSE<K>
-
- All Implemented Interfaces:
RSExtractor<K>
- Direct Known Subclasses:
BigDecimalRSE
,DoubleRSE
,IntegerRSE
,LongRSE
,StringRSE
public abstract class SingleColumnRSE<K> extends Object implements RSExtractor<K>
Result Set Extractor for query where just one column should be get. Can be used the column name or the column index. Default is using column index at position 1.- Author:
- Fugerit
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_COLUMN_INDEX
static int
USE_NAME_INDEX
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleColumnRSE()
protected
SingleColumnRSE(int index)
protected
SingleColumnRSE(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract K
convert(Object o)
K
extractNext(ResultSet rs)
int
getColumnIndex()
String
getColumnName()
boolean
isUseColumnIndex()
boolean
isUseColumnName()
-
-
-
Field Detail
-
DEFAULT_COLUMN_INDEX
public static final int DEFAULT_COLUMN_INDEX
- See Also:
- Constant Field Values
-
USE_NAME_INDEX
public static final int USE_NAME_INDEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SingleColumnRSE
protected SingleColumnRSE(int index)
-
SingleColumnRSE
protected SingleColumnRSE(String name)
-
SingleColumnRSE
protected SingleColumnRSE()
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getColumnIndex
public int getColumnIndex()
-
isUseColumnIndex
public boolean isUseColumnIndex()
-
isUseColumnName
public boolean isUseColumnName()
-
extractNext
public K extractNext(ResultSet rs) throws SQLException
- Specified by:
extractNext
in interfaceRSExtractor<K>
- Throws:
SQLException
-
-