I - The Query Instance which is valid for this definitionR - Type of the resulting items.public abstract class Query<R,I extends QueryParameters> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AND |
protected static String |
OR |
| Constructor and Description |
|---|
Query()
The constructor doing some initialization
|
| Modifier and Type | Method and Description |
|---|---|
abstract String |
buildQuery(I queryInstance)
Build the query
|
abstract I |
createInstance()
Create an empty instance for this definition
|
PageableList |
postQueryExecution(I queryParameters,
PageableList result)
Deprecated.
Use
Converter instead. |
protected void |
renderOrderbyClause(StringBuilder mainQuery,
I queryInstance)
Render the order by clause
|
protected void |
renderSearch(StringBuilder whereQuery,
String[] fields,
String[] paramNames,
boolean encloseInParenthesis,
boolean useFulltext)
Render a search condition that will search in one or several fields for one ore more values.
|
protected abstract void |
setupQueries()
Setup the query constants.
|
protected static final String AND
protected static final String OR
public abstract String buildQuery(I queryInstance)
queryInstance - The query instance containing the necessary parameters and configurationpublic abstract I createInstance()
@Deprecated public PageableList postQueryExecution(I queryParameters, PageableList result)
Converter instead.queryParameters - the query instanceresult - the result containing the items returned by executed queryprotected void renderOrderbyClause(StringBuilder mainQuery, I queryInstance)
mainQuery - the main queryqueryInstance - the query instanceprotected void renderSearch(StringBuilder whereQuery, String[] fields, String[] paramNames, boolean encloseInParenthesis, boolean useFulltext)
whereQuery - the where part of the query to extendfields - the fields that should be searchedparamNames - the parameter names that substitute the search values. Blank values will be
skipped.encloseInParenthesis - whether to enclose the rendered search condition in parenthesisuseFulltext - true if the fulltext search should be used (if the database is supporting it)protected abstract void setupQueries()
Copyright © 2019 Communote team. All rights reserved.