I - The Query Instance which is valid for this definitionR - Type of the result for this query.public class BlogQuery<R,I extends BlogQueryParameters> extends PropertyQuery<R,I>
| Modifier and Type | Field and Description |
|---|---|
static String |
ALIAS_BLOG
blog query alias
|
static String |
ALIAS_BLOG_GROUP
blog group query alias
|
static String |
ALIAS_BLOG_GROUP_MEMBER
blog group query member alias
|
static String |
ALIAS_BLOG_GROUP_MEMBER_USER
blog group member query alias
|
static String |
ALIAS_EXTERNAL_OBJECT
alias for the external object
|
static String |
ALIAS_TAGS
tags query alias
|
static BlogQuery<BlogData,BlogQueryParameters> |
DEFAULT_QUERY
Static default query.
|
static String |
RESULT_ALIAS_BLOG |
| Constructor and Description |
|---|
BlogQuery(Class<R> resultListItemType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildQuery(I queryParameters)
Build the query
|
I |
createInstance()
Create an empty instance for this definition
|
protected List<String> |
getConstructorParameter() |
protected List<String> |
getGroupByParameter() |
protected Class<R> |
getResultListItem() |
protected String |
renderAccessQuery(StringBuilder where,
I parameters) |
protected void |
renderGroupBy(StringBuilder query) |
protected void |
renderSelect(StringBuilder query) |
protected String |
renderSubQueryForTopicHierarchies(I queryParameters,
String wherePrefix,
StringBuilder selectQuery,
StringBuilder whereQuery)
Renders the where part for topic hierarchies.
|
protected String |
renderTagPrefixQuery(I queryInstance,
StringBuilder query,
String prefix)
Renders the tag search prefix constraint to the query
|
protected boolean |
renderTagsQuery(I instance,
StringBuilder query,
String prefix)
This method renders the query part for tags.
|
protected void |
setupQueries()
Setup the query constants.
|
protected boolean |
tagEntityRequiredInQuery()
defines if the tag entity is required for the query
|
renderPropertyFilterspostQueryExecution, renderOrderbyClause, renderSearchpublic static final BlogQuery<BlogData,BlogQueryParameters> DEFAULT_QUERY
public static final String ALIAS_BLOG
public static final String RESULT_ALIAS_BLOG
public static final String ALIAS_TAGS
public static final String ALIAS_BLOG_GROUP
public static final String ALIAS_BLOG_GROUP_MEMBER
public static final String ALIAS_BLOG_GROUP_MEMBER_USER
public static final String ALIAS_EXTERNAL_OBJECT
public String buildQuery(I queryParameters)
buildQuery in class Query<R,I extends BlogQueryParameters>queryParameters - The query instance containing the necessary parameters and configurationpublic I createInstance()
createInstance in class Query<R,I extends BlogQueryParameters>protected List<String> getConstructorParameter()
protected List<String> getGroupByParameter()
protected String renderAccessQuery(StringBuilder where, I parameters)
where - the where clause to append toparameters - the instance to useprotected void renderGroupBy(StringBuilder query)
query - The query.protected void renderSelect(StringBuilder query)
query - The query.protected String renderSubQueryForTopicHierarchies(I queryParameters, String wherePrefix, StringBuilder selectQuery, StringBuilder whereQuery)
queryParameters - The query parameters.wherePrefix - The prefix to use.selectQuery - The select query.whereQuery - The query to append.protected String renderTagPrefixQuery(I queryInstance, StringBuilder query, String prefix)
queryInstance - the current query instancequery - the query to write toprefix - the prefix to prepend before writing to the queryprotected boolean renderTagsQuery(I instance, StringBuilder query, String prefix)
instance - the current query instancequery - the query to write toprefix - the prefix to prepend before writing to the queryprotected void setupQueries()
setupQueries in class Query<R,I extends BlogQueryParameters>protected boolean tagEntityRequiredInQuery()
true if the tag entity is requiredCopyright © 2019 Communote team. All rights reserved.