|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.garret.consus.Query
Class used for construction of parameterized queries.
Constructor Summary | |
---|---|
Query(java.sql.Connection con)
Query constructor. |
Method Summary | |
---|---|
Query |
add(java.lang.String cond)
Append String to the statement. |
Query |
and(java.lang.String cond)
Append a conjunct to the statement. |
ConsusResultSet |
executeQuery()
Prepare and execute the query. |
int |
executeUpdate()
Prepare and execute the update statement. |
Query |
param(boolean val)
Bind the boolean parameter. |
Query |
param(double val)
Bind the double parameter. |
Query |
param(float val)
Bind the float parameter. |
Query |
param(int val)
Bind the integer parameter. |
Query |
param(long val)
Bind the long parameter. |
Query |
param(java.lang.Object val)
Bind any object parameter. |
ConsusPreparedStatement |
prepare()
Prepare the statement. |
void |
reset()
Reset the query. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Query(java.sql.Connection con)
con
- database connectionMethod Detail |
---|
public Query add(java.lang.String cond)
cond
- appended string
this
public Query and(java.lang.String cond)
WHERE
", otherwise it is prepended by " AND
".
cond
- appended conjunct
this
public ConsusResultSet executeQuery() throws java.sql.SQLException
ResultSet
with results of the query execution
java.sql.SQLException
public int executeUpdate() throws java.sql.SQLException
java.sql.SQLException
public Query param(boolean val)
val
- parameter value
this
public Query param(double val)
val
- parameter value
this
public Query param(float val)
val
- parameter value
this
public Query param(int val)
val
- parameter value
this
public Query param(long val)
val
- parameter value
this
public Query param(java.lang.Object val)
val
- parameter value
this
public ConsusPreparedStatement prepare() throws java.sql.SQLException
java.sql.SQLException
public void reset()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |