Package org.alfresco.rest.api.impl
Class QueriesImpl.AbstractQuery<T>
java.lang.Object
org.alfresco.rest.api.impl.QueriesImpl.AbstractQuery<T>
- Enclosing class:
QueriesImpl
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSortOrder(Parameters parameters, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, List<SortColumn> defaultSortCols, SearchParameters sp) Adds sort order to the SearchParameters.protected abstract voidbuildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName) Builds up the query and is expected to callSearchParameters.setDefaultFieldName(String)andSearchParameters.addQueryTemplate(String, String)protected abstract TConverts a nodeRef into the an object of the required type.protected StringescapeTerm(String term) Trim and escape the term - override if neededfind(Parameters parameters, String termName, int minTermLength, String queryTemplateName, QueriesImpl.AbstractQuery.Sort sort, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, SortColumn... defaultSort) protected StringgetTerm(Parameters parameters, String termName, int minTermLength) protected static <T> CollectionWithPagingInfo<T> postQuerySort(Parameters parameters, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, List<SortColumn> defaultSortCols, Set<NodeRef> unsortedNodeRefs)
-
Constructor Details
-
AbstractQuery
-
-
Method Details
-
find
public CollectionWithPagingInfo<T> find(Parameters parameters, String termName, int minTermLength, String queryTemplateName, QueriesImpl.AbstractQuery.Sort sort, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, SortColumn... defaultSort) -
buildQuery
protected abstract void buildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName) Builds up the query and is expected to callSearchParameters.setDefaultFieldName(String)andSearchParameters.addQueryTemplate(String, String)- Parameters:
query- StringBuilder into which the query should be built.term- to be searched forsp- SearchParametersqueryTemplateName-
-
convert
Converts a nodeRef into the an object of the required type.- Parameters:
nodeRef- to be convertedincludeParam- additional fields to be included- Returns:
- the object
-
getTerm
-
escapeTerm
Trim and escape the term - override if needed- Parameters:
term-- Returns:
-
addSortOrder
protected void addSortOrder(Parameters parameters, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, List<SortColumn> defaultSortCols, SearchParameters sp) Adds sort order to the SearchParameters. -
postQuerySort
protected List<NodeRef> postQuerySort(Parameters parameters, Map<String, org.alfresco.service.namespace.QName> sortParamsToQNames, List<SortColumn> defaultSortCols, Set<NodeRef> unsortedNodeRefs) -
listPage
-