|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jdon.model.query.JdbcTemp
public class JdbcTemp
JDBC Template using this class, don't need write jdbc operations.
| Constructor Summary | |
|---|---|
JdbcTemp(javax.sql.DataSource dataSource)
|
|
| Method Summary | |
|---|---|
void |
operate(java.util.Collection insertParams,
java.lang.String sql)
this method can used for insert/update/delete for database In insertParams the parameter type only supports: String Integer Float or Long Double Bye Short if you need operate other types, you must use JDBC directly replacing this method. |
java.util.List |
queryMultiObject(java.util.Collection queryParams,
java.lang.String sqlquery)
this method is fit for this sql: select id, name, password from user where id = ? the " id, name, password " and its values are packed in a map of returen list. |
java.util.List |
queryMultiObject(java.util.Collection queryParams,
java.lang.String sqlquery,
int start,
int count)
same as queryMultiObject(Collection queryParams, String sqlquery) but the result is a block result, the result'size is the value of count, and the result's start poiny is the value of start. |
java.lang.Object |
querySingleObject(java.util.Collection queryParams,
java.lang.String sqlquery)
get a single object from database fit for this sql: select name from user where id=? the "name" is single result |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcTemp(javax.sql.DataSource dataSource)
| Method Detail |
|---|
public java.lang.Object querySingleObject(java.util.Collection queryParams,
java.lang.String sqlquery)
throws java.lang.Exception
queryParams - sqlquery -
java.lang.Exception
public java.util.List queryMultiObject(java.util.Collection queryParams,
java.lang.String sqlquery)
throws java.lang.Exception
queryParams - sqlquery -
java.lang.Exception
public java.util.List queryMultiObject(java.util.Collection queryParams,
java.lang.String sqlquery,
int start,
int count)
throws java.lang.Exception
queryParams - sqlquery - start - count -
java.lang.Exception
public void operate(java.util.Collection insertParams,
java.lang.String sql)
throws java.lang.Exception
insertParams - the parameter that will be insert into sql.sql - the standard sql sentence.
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||