|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.skife.jdbi.v2.util.TimestampMapper
public class TimestampMapper
Convenience ResultSetMapper for extracting a single value result from a query.
| Field Summary | |
|---|---|
static TimestampMapper |
FIRST
An instance which extracts value from the first field |
| Constructor Summary | |
|---|---|
TimestampMapper()
Create a new instance which extracts the value from the first column |
|
TimestampMapper(int index)
Create a new instance which extracts the value positionally in the result set |
|
TimestampMapper(String name)
Create a new instance which extracts the value by name or alias from the result set |
|
| Method Summary | |
|---|---|
protected Timestamp |
extractByIndex(ResultSet r,
int index)
|
protected Timestamp |
extractByName(ResultSet r,
String name)
|
T |
map(int index,
ResultSet r,
StatementContext ctx)
Map the row the result set is at when passed in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TimestampMapper FIRST
| Constructor Detail |
|---|
public TimestampMapper()
public TimestampMapper(int index)
index - 1 based column index into the result setpublic TimestampMapper(String name)
name - The name or alias for the field| Method Detail |
|---|
protected Timestamp extractByIndex(ResultSet r,
int index)
throws SQLException
SQLException
protected Timestamp extractByName(ResultSet r,
String name)
throws SQLException
SQLException
public T map(int index,
ResultSet r,
StatementContext ctx)
throws SQLException
ResultSetMapper
map in interface ResultSetMapper<T>index - which row of the result set we are at, starts at 0r - the result set being iterated
SQLException - if anythign goes wrong go ahead and let this percolate, jDBI will handle it
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||