-
- 既知のサブインタフェースのリスト:
BasicCommand,NamedParameterCommand,OrderedParameterCommand
public interface CommandAn executable request- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 static BasicCommandcreate(OrmConnection conn, String sql)Creates aBasicCommandfrom SQL string.static OrderedParameterCommandcreate(OrmConnection conn, String sql, Object... parameters)Creates aOrderedParameterCommandfrom SQL string.static NamedParameterCommandcreate(OrmConnection conn, String sql, Map<String,Object> parameters)Creates aNamedParameterCommandfrom SQL string.static Commandcreate(OrmConnection conn, ParameterizedSql sql)Creates aCommandfrom SQL string.<T> TexecuteQuery(ResultSetTraverser<T> resultSetTraverser)Executes a query and apply the given handler to the returned result set.<T> List<T>executeQuery(RowMapper<T> rowMapper)Executes a query and apply the given mapper to the each row in returned result set.intexecuteUpdate()Executes an update and returns the number of rows modified.<T> TreadFirst(Class<T> objectClass)Reads an object from the database.<T> List<T>readList(Class<T> objectClass)Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class.<T> TreadOne(Class<T> objectClass)Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class.<T1,T2>
List<Tuple.Tuple2<T1,T2>>readTupleList(Class<T1> t1, Class<T2> t2)Reads results as List ofTuple.Tuple2for reading JOIN SQL results typically.<T1,T2,T3>
List<Tuple.Tuple3<T1,T2,T3>>readTupleList(Class<T1> t1, Class<T2> t2, Class<T3> t3)Reads results as List ofTuple.Tuple3for reading JOIN SQL results typically.
-
-
-
メソッドの詳細
-
create
static Command create(OrmConnection conn, ParameterizedSql sql)
Creates aCommandfrom SQL string.- パラメータ:
sql-- 戻り値:
-
create
static BasicCommand create(OrmConnection conn, String sql)
Creates aBasicCommandfrom SQL string.- パラメータ:
sql-- 戻り値:
-
create
static NamedParameterCommand create(OrmConnection conn, String sql, Map<String,Object> parameters)
Creates aNamedParameterCommandfrom SQL string.- パラメータ:
sql-parameters-- 戻り値:
-
create
static OrderedParameterCommand create(OrmConnection conn, String sql, Object... parameters)
Creates aOrderedParameterCommandfrom SQL string.- パラメータ:
sql-parameters-- 戻り値:
-
executeQuery
<T> T executeQuery(ResultSetTraverser<T> resultSetTraverser)
Executes a query and apply the given handler to the returned result set.- 型パラメータ:
T-- パラメータ:
resultSetTraverser-- 戻り値:
-
executeQuery
<T> List<T> executeQuery(RowMapper<T> rowMapper)
Executes a query and apply the given mapper to the each row in returned result set.- 型パラメータ:
T-- パラメータ:
rowMapper-- 戻り値:
-
executeUpdate
int executeUpdate()
Executes an update and returns the number of rows modified.- 戻り値:
-
readFirst
<T> T readFirst(Class<T> objectClass)
Reads an object from the database.- 型パラメータ:
T-- パラメータ:
objectClass-- 戻り値:
-
readList
<T> List<T> readList(Class<T> objectClass)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.- 型パラメータ:
T-- パラメータ:
objectClass-- 戻り値:
-
readOne
<T> T readOne(Class<T> objectClass)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.- 型パラメータ:
T-- パラメータ:
objectClass-- 戻り値:
-
readTupleList
<T1,T2> List<Tuple.Tuple2<T1,T2>> readTupleList(Class<T1> t1, Class<T2> t2)
Reads results as List ofTuple.Tuple2for reading JOIN SQL results typically.- 型パラメータ:
T1-T2-- パラメータ:
t1-t2-- 戻り値:
-
readTupleList
<T1,T2,T3> List<Tuple.Tuple3<T1,T2,T3>> readTupleList(Class<T1> t1, Class<T2> t2, Class<T3> t3)
Reads results as List ofTuple.Tuple3for reading JOIN SQL results typically.- 型パラメータ:
T1-T2-- パラメータ:
t1-t2-- 戻り値:
-
-