T
- R
- public class JdbcPreparedStatementAdapter<T,R> extends Object implements StatementAdapter<T,ResultSet>
Constructor and Description |
---|
JdbcPreparedStatementAdapter(PreparedStatement stmt,
Queryable queryable) |
Modifier and Type | Method and Description |
---|---|
StatementAdapter<T,ResultSet> |
bind(Param... values)
Bind the varargs parameters to statement
|
StatementAdapter<T,ResultSet> |
bind(Param param)
Bind an argument to a position parameter.
|
StatementAdapter<T,ResultSet> |
bind(String name,
Object value)
Bind an argument to a named parameter.
|
void |
bindKey()
bind the keys generated
|
void |
close() |
int |
execute() |
int |
reset()
reset the internal index position parameter to zero.
|
List<T> |
rows() |
void |
setFetchSize(int rows)
Set the number of rows that should be fetched when the statement hit the database.
|
StatementAdapter<T,ResultSet> |
with(AutoKey autoKey) |
StatementAdapter<T,ResultSet> |
with(ResultRow<T,ResultSet> resultRow)
result row
|
public JdbcPreparedStatementAdapter(PreparedStatement stmt, Queryable queryable)
public StatementAdapter<T,ResultSet> with(ResultRow<T,ResultSet> resultRow)
StatementAdapter
with
in interface StatementAdapter<T,ResultSet>
resultRow
- how to process the rowspublic StatementAdapter<T,ResultSet> bind(String name, Object value)
StatementAdapter
bind
in interface StatementAdapter<T,ResultSet>
name
- of parametervalue
- of parameterpublic StatementAdapter<T,ResultSet> bind(Param param)
StatementAdapter
bind
in interface StatementAdapter<T,ResultSet>
param
- of parameterpublic StatementAdapter<T,ResultSet> bind(Param... values)
StatementAdapter
bind
in interface StatementAdapter<T,ResultSet>
values
- of parameters as arbitrary numberpublic void bindKey()
StatementAdapter
bindKey
in interface StatementAdapter<T,ResultSet>
public StatementAdapter<T,ResultSet> with(AutoKey autoKey)
with
in interface StatementAdapter<T,ResultSet>
public int execute()
execute
in interface StatementAdapter<T,ResultSet>
public int reset()
StatementAdapter
reset
in interface StatementAdapter<T,ResultSet>
public void close()
close
in interface StatementAdapter<T,ResultSet>
public void setFetchSize(int rows)
StatementAdapter
setFetchSize
in interface StatementAdapter<T,ResultSet>
rows
- the number of rows to fetchCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.