public class QueryInfo extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
QueryInfo.RowMapper
RowMapper
An interface to create an Object from a query result row
|
| Constructor and Description |
|---|
QueryInfo(QueryInfo.RowMapper rowMapper,
String table,
String... columns) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getColumns()
Returns a list of which columns to return
|
String |
getGroupBy()
Returns a filter declaring how to group rows, formatted as an SQL GROUP BY clause
|
String |
getHaving()
Returns a filter declaring which row groups to include in the cursor
|
String |
getLimit()
Returns a limit clause for the number of rows returned by the query
|
String |
getOrderBy()
Returns how to order the rows
|
String[] |
getParameterNames()
Get the parameter names mapped to selection arguments in same order
|
QueryInfo.RowMapper |
getRowMapper()
Returns agent which maps a query result row to an object
|
String |
getSelection()
Returns a filter declaring which rows to return
|
String[] |
getSelectionArgs()
Returns the selection arguments
|
String |
getTable()
Returns The table name to compile the query against.
|
void |
setGroupBy(String groupBy)
Sets a filter declaring how to group rows, formatted as an SQL GROUP BY clause
|
void |
setHaving(String having)
Set a filter declaring which row groups to include in the cursor
|
void |
setLimit(String limit)
Set a limit clause for the number of rows returned by the query
|
void |
setOrderBy(String orderBy)
Set how to order the rows
|
void |
setParameterNames(String[] parameterNames)
Set the parameter names mapped to selection arguments in same order
|
void |
setSelection(String selection)
Sets a filter declaring which rows to return
|
void |
setSelectionArgs(String[] selectionArgs)
Sets the selection arguments.
|
public QueryInfo(QueryInfo.RowMapper rowMapper, String table, String... columns)
public String getTable()
public String[] getColumns()
public String getSelection()
public void setSelection(String selection)
selection - String formatted as an SQL WHERE clause
(excluding the WHERE itself)public String[] getParameterNames()
public void setParameterNames(String[] parameterNames)
parameterNames - String[]public String getGroupBy()
public void setGroupBy(String groupBy)
groupBy - String formatted as an SQL HAVING clause
(excluding the HAVING itself)public String getHaving()
public void setHaving(String having)
having - String formatted as an SQL ORDER BY clause
(excluding the ORDER BY itself)public String getOrderBy()
public void setOrderBy(String orderBy)
orderBy - String formatted as an SQL ORDER BY clause
(excluding the ORDER BY itself). Default null will use the
default sort order, which may be unordered.public String getLimit()
public void setLimit(String limit)
limit - String formatted as either a single public QueryInfo.RowMapper getRowMapper()
public String[] getSelectionArgs()
public void setSelectionArgs(String[] selectionArgs)
selectionArgs - String[]This documentation is licensed by Andrew Bowley under the GPLv3 License.