Package net.sf.jkniv.whinstone.statement
Interface StatementAdapter<T,R>
-
- Type Parameters:
T- type of object to return byRepositoryR- The driver result of a query likeResultSet
public interface StatementAdapter<T,R>- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatementAdapter<T,R>bind(String name, Object value)Bind an argument to a named parameter.StatementAdapter<T,R>bind(Param value)Bind an argument to a position parameter.StatementAdapter<T,R>bind(Param... values)Bind the varargs parameters to statementvoidbindKey()bind the keys generatedvoidclose()intexecute()intreset()reset the internal index position parameter to zero.List<T>rows()voidsetFetchSize(int rows)Set the number of rows that should be fetched when the statement hit the database.StatementAdapter<T,R>with(ResultRow<T,R> resultRow)result rowStatementAdapter<T,R>with(AutoKey generateKey)
-
-
-
Method Detail
-
bind
StatementAdapter<T,R> bind(String name, Object value)
Bind an argument to a named parameter.- Parameters:
name- of parametervalue- of parameter- Returns:
- instance of this object
-
bind
StatementAdapter<T,R> bind(Param value)
Bind an argument to a position parameter.- Parameters:
value- of parameter- Returns:
- instance of this object
-
bind
StatementAdapter<T,R> bind(Param... values)
Bind the varargs parameters to statement- Parameters:
values- of parameters as arbitrary number- Returns:
- instance of this object
-
with
StatementAdapter<T,R> with(ResultRow<T,R> resultRow)
result row- Parameters:
resultRow- how to process the rows- Returns:
- instance of this object
-
with
StatementAdapter<T,R> with(AutoKey generateKey)
-
bindKey
void bindKey()
bind the keys generated
-
execute
int execute()
-
reset
int reset()
reset the internal index position parameter to zero.- Returns:
- return current index position before reset
-
close
void close()
-
setFetchSize
void setFetchSize(int rows)
Set the number of rows that should be fetched when the statement hit the database.- Parameters:
rows- the number of rows to fetch
-
-