@ProviderType
public interface CloseableQueryBuilder
Query instances to produce
CloseableQuery instances, whose CloseableQuery.close() method cleans up the internal shallow resource
resolver.| Modifier and Type | Method and Description |
|---|---|
void |
clearFacetCache()
Clears the QueryBuilder facet cache, in case you need to do that.
|
CloseableQuery |
createQuery(com.day.cq.search.PredicateGroup predicates,
org.apache.sling.api.resource.ResourceResolver resourceResolver)
Create a closeable query around the provided predicate group.
|
CloseableQuery |
createQuery(com.day.cq.search.PredicateGroup predicates,
javax.jcr.Session session)
Create a closeable query around the provided predicate group.
|
CloseableQuery |
createQuery(org.apache.sling.api.resource.ResourceResolver resourceResolver)
Create a closeable query.
|
CloseableQuery |
createQuery(javax.jcr.Session session)
Create a closeable query.
|
CloseableQuery |
loadQuery(String path,
org.apache.sling.api.resource.ResourceResolver resourceResolver)
Load a CQ Search query from a properties file located at the specified path.
|
CloseableQuery |
loadQuery(String path,
javax.jcr.Session session)
Load a CQ Search query from a properties file located at the specified path.
|
void |
storeQuery(com.day.cq.search.Query query,
String path,
boolean createFile,
org.apache.sling.api.resource.ResourceResolver resourceResolver)
Saves the query predicates to a properties file in the repository at the specified path.
|
void |
storeQuery(com.day.cq.search.Query query,
String path,
boolean createFile,
javax.jcr.Session session)
Saves the query predicates to a properties file in the repository at the specified path.
|
CloseableQuery createQuery(com.day.cq.search.PredicateGroup predicates, org.apache.sling.api.resource.ResourceResolver resourceResolver)
predicates - the root group of predicatesresourceResolver - the session to useCloseableQuery createQuery(org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceResolver - the session to useCloseableQuery createQuery(com.day.cq.search.PredicateGroup predicates, javax.jcr.Session session)
predicates - the root group of predicatessession - the session to useCloseableQuery createQuery(javax.jcr.Session session)
session - the session to useCloseableQuery loadQuery(String path, org.apache.sling.api.resource.ResourceResolver resourceResolver) throws javax.jcr.RepositoryException, IOException
path - a repository path to a properties fileresourceResolver - the resource resolver providing access to the repositoryjavax.jcr.RepositoryException - on JCR failureIOException - on failure to read properties fileCloseableQuery loadQuery(String path, javax.jcr.Session session) throws javax.jcr.RepositoryException, IOException
path - a repository path to a properties filesession - the session providing access to the repositoryjavax.jcr.RepositoryException - on JCR failureIOException - on failure to read properties filevoid storeQuery(com.day.cq.search.Query query,
String path,
boolean createFile,
org.apache.sling.api.resource.ResourceResolver resourceResolver)
throws javax.jcr.RepositoryException,
IOException
query - the query whose predicates should be storedpath - the path of the properties filecreateFile - true to create the file if it doesn't exist alreadyresourceResolver - the session to usejavax.jcr.RepositoryException - on JCR failureIOException - on failure save properties filevoid storeQuery(com.day.cq.search.Query query,
String path,
boolean createFile,
javax.jcr.Session session)
throws javax.jcr.RepositoryException,
IOException
query - the query whose predicates should be storedpath - the path of the properties filecreateFile - true to create the file if it doesn't exist alreadysession - the session to usejavax.jcr.RepositoryException - on JCR failureIOException - on failure save properties filevoid clearFacetCache()
Copyright © 2013–2020 Adobe. All rights reserved.