|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.util.db.DatabaseQuery
A database query. This class encapsulates an SQL query or statement that can be executed on a database connection.
| Constructor Summary | |
DatabaseQuery()
Creates a new empty database query. |
|
DatabaseQuery(java.lang.String name)
Creates a new database query with the specified name. |
|
| Method Summary | |
void |
addParameter(boolean value)
Adds a boolean query parameter. |
void |
addParameter(int value)
Adds an integer query parameter. |
void |
addParameter(java.lang.Object obj)
Adds a query parameter. |
java.lang.String |
getName()
Returns the query name. |
java.lang.Object |
getParameter(int pos)
Returns a query parameter. |
int |
getParameterCount()
Returns the number of query parameters. |
java.lang.String |
getSql()
Returns the SQL text for the query. |
boolean |
hasResults()
Checks if this database query will create a result. |
boolean |
hasSql()
Checks if this query has SQL text. |
void |
setSql(java.lang.String sql)
Sets the SQL text for the query. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DatabaseQuery()
setSql(java.lang.String)public DatabaseQuery(java.lang.String name)
name - the query name| Method Detail |
public boolean hasSql()
public boolean hasResults()
public java.lang.String getName()
public java.lang.String getSql()
public void setSql(java.lang.String sql)
sql - the SQL textpublic int getParameterCount()
public java.lang.Object getParameter(int pos)
pos - the parameter position, 0 <= pos < count
public void addParameter(java.lang.Object obj)
obj - the query parameterpublic void addParameter(int value)
value - the query parameter valuepublic void addParameter(boolean value)
value - the query parameter valuepublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||