|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.javaranch.db.DBQuery
Constructor Summary | |
DBQuery(java.lang.String table)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
int searchValue)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
int[] searchValues)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
int[] searchValues,
java.lang.String[] dataColumns)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
int searchValue,
java.lang.String[] dataColumns)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
java.lang.String searchText)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
java.lang.String[] searchText)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
java.lang.String[] searchText,
java.lang.String[] dataColumns)
|
|
DBQuery(java.lang.String table,
java.lang.String column,
java.lang.String searchText,
java.lang.String[] dataColumns)
|
Method Summary | |
void |
addSearch(java.lang.String column,
int searchValue)
|
void |
addSearch(java.lang.String column,
int[] searchValues)
Add search parameters to the existing search using 'AND'. |
void |
addSearch(java.lang.String column,
java.lang.String searchText)
Add search parameters to the existing search using 'AND'. |
void |
addSearch(java.lang.String column,
java.lang.String[] searchText)
Add search parameters to the existing search using 'AND'. |
void |
addStartsWithSearch(java.lang.String column,
java.lang.String substring)
Add search parameters to the existing search using 'AND', looking for a substring at the beginning of a column. |
void |
addSubstringSearch(java.lang.String column,
java.lang.String substring)
Add search parameters to the existing search using 'AND', looking for a substring within a column. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String[] |
getDataColumns()
For use by DBFacade. |
java.lang.String |
getOrderByClause()
For use by DBFacade. |
java.lang.String |
getSQL()
|
java.lang.String |
getTable()
For use by DBFacade. |
java.lang.String |
getWhereClause()
For use by DBFacade. |
int |
hashCode()
|
void |
setDataColumns(java.lang.String[] dataColumns)
Specify the columns you want to get back from the query. |
void |
setOrderByClause(java.lang.String orderBy)
Specify the order to receive the data. |
void |
setSearch(java.lang.String column,
int searchValue)
|
void |
setSearch(java.lang.String column,
int[] searchValues)
|
void |
setSearch(java.lang.String column,
java.lang.String searchText)
The heart of this query object. |
void |
setSearch(java.lang.String column,
java.lang.String[] searchText)
|
void |
setStartsWithSearch(java.lang.String column,
java.lang.String substring)
Set the query search to look for a substring at the beginning of a column. |
void |
setSubstringSearch(java.lang.String column,
java.lang.String substring)
Set the query search to look for a substring within a column. |
void |
setWhereClause(java.lang.String whereClause)
In case you want to use an 'interesting' where clause that DBQuery cannot create otherwise. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DBQuery(java.lang.String table)
public DBQuery(java.lang.String table, java.lang.String column, java.lang.String searchText)
public DBQuery(java.lang.String table, java.lang.String column, int searchValue)
public DBQuery(java.lang.String table, java.lang.String column, int[] searchValues)
public DBQuery(java.lang.String table, java.lang.String column, java.lang.String[] searchText)
public DBQuery(java.lang.String table, java.lang.String column, java.lang.String searchText, java.lang.String[] dataColumns)
public DBQuery(java.lang.String table, java.lang.String column, java.lang.String[] searchText, java.lang.String[] dataColumns)
searchText
- An "OR" will be used between each searchText item.public DBQuery(java.lang.String table, java.lang.String column, int searchValue, java.lang.String[] dataColumns)
public DBQuery(java.lang.String table, java.lang.String column, int[] searchValues, java.lang.String[] dataColumns)
searchValues
- An "OR" will be used between each searchValues item.Method Detail |
public void setOrderByClause(java.lang.String orderBy)
orderBy
- Pass in null if order is not important, otherwise pass in the SQL that would normally follow the "ORDER BY" SQL phrase - usually, this is simply the name of a column. public void setSearch(java.lang.String column, java.lang.String searchText)
public void addSearch(java.lang.String column, java.lang.String searchText)
public void setSearch(java.lang.String column, int searchValue)
public void addSearch(java.lang.String column, int searchValue)
public void setSubstringSearch(java.lang.String column, java.lang.String substring)
substring
- the string fragment to look for in a column.public void addSubstringSearch(java.lang.String column, java.lang.String substring)
substring
- the string fragment to look for in a column.public void setStartsWithSearch(java.lang.String column, java.lang.String substring)
substring
- the string fragment to look for in a column.public void addStartsWithSearch(java.lang.String column, java.lang.String substring)
substring
- the string fragment to look for in a column.public void setSearch(java.lang.String column, java.lang.String[] searchText)
searchText
- The array of strings will be used to build a SQL "IN" statement.public void addSearch(java.lang.String column, java.lang.String[] searchText)
searchText
- The array of strings will be used to build a SQL "IN" statement.public void setSearch(java.lang.String column, int[] searchValues)
searchValues
- The array of strings will be used to build a SQL "IN" statement.public void addSearch(java.lang.String column, int[] searchValues)
searchValues
- The array of strings will be used to build a SQL "IN" statement.public void setWhereClause(java.lang.String whereClause)
public void setDataColumns(java.lang.String[] dataColumns)
public java.lang.String[] getDataColumns()
public java.lang.String getTable()
public java.lang.String getWhereClause()
public java.lang.String getOrderByClause()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSQL()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |