Interface QueryHelper


  • @ProviderType
    public interface QueryHelper
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<org.apache.sling.api.resource.Resource> findResources​(org.apache.sling.api.resource.ResourceResolver resourceResolver, String language, String statement, String relPath)  
      boolean isTraversal​(org.apache.sling.api.resource.ResourceResolver resourceResolver, String language, String statement)
      Determines if the provided query will traverse.
      boolean isTraversal​(org.apache.sling.api.resource.ResourceResolver resourceResolver, Map<String,​String> queryBuilderParams)
      Determines if the provided query will traverse.
    • Method Detail

      • findResources

        List<org.apache.sling.api.resource.Resource> findResources​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                                   String language,
                                                                   String statement,
                                                                   String relPath)
                                                            throws javax.jcr.RepositoryException
        Parameters:
        resourceResolver - the resourceResolver providing access into the JCR
        language - querybuilder, list, xpath, JCR-SQL, JCR-SQL2
        statement - the query statement
        relPath - the relative path to apply to the query result resources
        Returns:
        a list of Resource objects
        Throws:
        javax.jcr.RepositoryException
      • isTraversal

        boolean isTraversal​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                            String language,
                            String statement)
                     throws javax.jcr.RepositoryException
        Determines if the provided query will traverse.
        Parameters:
        resourceResolver - the resourceResolver providing access into the JCR
        language - the query language (xpath, JCR-SQL, JCR-SQL2)
        statement - the query statement
        Returns:
        true if the query will traverse, false if it will not
        Throws:
        javax.jcr.RepositoryException
      • isTraversal

        boolean isTraversal​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                            Map<String,​String> queryBuilderParams)
                     throws javax.jcr.RepositoryException
        Determines if the provided query will traverse.
        Parameters:
        resourceResolver - the resourceResolver providing access into the JCR
        queryBuilderParams - map of query builder params
        Returns:
        true if the query will traverse, false if it will not
        Throws:
        javax.jcr.RepositoryException