public class JpaStatementAdapter<T,R> extends Object implements StatementAdapter<T,ResultSet>
Constructor and Description |
---|
JpaStatementAdapter(javax.persistence.Query query,
Queryable queryable,
HandleableException handlerException) |
Modifier and Type | Method and Description |
---|---|
StatementAdapter<T,ResultSet> |
bind(Param... values)
Bind the varargs parameters to statement
|
StatementAdapter<T,ResultSet> |
bind(Param value)
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 generateKey) |
StatementAdapter<T,ResultSet> |
with(ResultRow<T,ResultSet> resultRow)
result row
|
public JpaStatementAdapter(javax.persistence.Query query, Queryable queryable, HandleableException handlerException)
public 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... values)
StatementAdapter
bind
in interface StatementAdapter<T,ResultSet>
values
- of parameters as arbitrary numberpublic int reset()
StatementAdapter
reset
in interface StatementAdapter<T,ResultSet>
public StatementAdapter<T,ResultSet> bind(Param value)
StatementAdapter
bind
in interface StatementAdapter<T,ResultSet>
value
- of parameterpublic StatementAdapter<T,ResultSet> with(ResultRow<T,ResultSet> resultRow)
StatementAdapter
with
in interface StatementAdapter<T,ResultSet>
resultRow
- how to process the rowspublic void bindKey()
StatementAdapter
bindKey
in interface StatementAdapter<T,ResultSet>
public StatementAdapter<T,ResultSet> with(AutoKey generateKey)
with
in interface StatementAdapter<T,ResultSet>
public int execute()
execute
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.