public class StringMapper extends TypedMapper<String>
Modifier and Type | Field and Description |
---|---|
static StringMapper |
FIRST
An instance which extracts value from the first field
|
Constructor and Description |
---|
StringMapper()
Create a new instance which extracts the value from the first column
|
StringMapper(int index)
Create a new instance which extracts the value positionally
in the result set
|
StringMapper(String name)
Create a new instance which extracts the value by name or alias from the result set
|
Modifier and Type | Method and Description |
---|---|
protected String |
extractByIndex(ResultSet r,
int index) |
protected String |
extractByName(ResultSet r,
String name) |
map
public static final StringMapper FIRST
public StringMapper()
public StringMapper(int index)
index
- 1 based column index into the result setpublic StringMapper(String name)
name
- The name or alias for the fieldprotected String extractByIndex(ResultSet r, int index) throws SQLException
extractByIndex
in class TypedMapper<String>
SQLException
protected String extractByName(ResultSet r, String name) throws SQLException
extractByName
in class TypedMapper<String>
SQLException
Copyright © 2023. All rights reserved.