|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.observation.persistence.QueryBuilder
public class QueryBuilder
This is a simple builder for prepared statements.
Nested Class Summary | |
---|---|
static interface |
QueryBuilder.SetObject
This interface is used to set objects into prepared statements. |
Constructor Summary | |
---|---|
QueryBuilder()
|
Method Summary | |
---|---|
QueryBuilder |
add(QueryBuilder.SetObject setter)
Add a new object setter. |
QueryBuilder |
add(String stmt)
Add a new part to the statement. |
PreparedStatement |
buildStatement(Connection conn)
Create a prepared statment with all parameter set. |
static QueryBuilder.SetObject |
stringSetter(String value)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryBuilder()
Method Detail |
---|
public QueryBuilder add(String stmt)
add(SetObject)
. It will append whitespace to separate tokens.
stmt
- the part of the query
this
for method chainingpublic QueryBuilder add(QueryBuilder.SetObject setter)
setter
-
this
for method chainingpublic PreparedStatement buildStatement(Connection conn) throws SQLException
conn
-
SQLException
public String toString()
toString
in class Object
public static QueryBuilder.SetObject stringSetter(String value)
value
- the string to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |