Interface HippoQuery

  • All Superinterfaces:
    javax.jcr.query.Query

    public interface HippoQuery
    extends javax.jcr.query.Query
    The HippoQuery is an extension to javax.jcr.query.Query to implement parameterized queries. Its interface is compliant with the upcoming standard of JCR2 (JSR-283) which leveraged the most important extension implemented; parameterized (stored) queries.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String HIPPOQL
      This query language is not yet available as public API, but reserved for future use.
      • Fields inherited from interface javax.jcr.query.Query

        JCR_JQOM, JCR_SQL2, SQL, XPATH
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bindValue​(String varName, javax.jcr.Value value)  
      javax.jcr.query.QueryResult execute​(Map<String,​String> arguments)
      Convenience method to bind all arguments of a query using a single map and immediately execute the query.
      int getArgumentCount()
      This addition has no counterpart in JSR-283, JSR-283 only compliant applications have no means to query which parameters should be bound before a query can be executed.
      String[] getArguments()  
      javax.jcr.Session getSession()
      Obtains the session in which this query can be executed.
      javax.jcr.Node storeAsNode​(String absPath, String type)  
      • Methods inherited from interface javax.jcr.query.Query

        execute, getBindVariableNames, getLanguage, getStatement, getStoredQueryPath, setLimit, setOffset, storeAsNode
    • Field Detail

      • HIPPOQL

        static final String HIPPOQL
        This query language is not yet available as public API, but reserved for future use.
        See Also:
        Constant Field Values
    • Method Detail

      • getSession

        javax.jcr.Session getSession()
                              throws javax.jcr.RepositoryException
        Obtains the session in which this query can be executed.
        Returns:
        the javax.jcr.Session associated with this Query instance
        Throws:
        javax.jcr.RepositoryException - if a generic repossitory error occurs
      • storeAsNode

        javax.jcr.Node storeAsNode​(String absPath,
                                   String type)
                            throws javax.jcr.ItemExistsException,
                                   javax.jcr.PathNotFoundException,
                                   javax.jcr.version.VersionException,
                                   javax.jcr.nodetype.ConstraintViolationException,
                                   javax.jcr.lock.LockException,
                                   javax.jcr.UnsupportedRepositoryOperationException,
                                   javax.jcr.RepositoryException
        Parameters:
        absPath -
        type -
        Throws:
        javax.jcr.ItemExistsException
        javax.jcr.PathNotFoundException
        javax.jcr.version.VersionException
        javax.jcr.nodetype.ConstraintViolationException
        javax.jcr.lock.LockException
        javax.jcr.UnsupportedRepositoryOperationException
        javax.jcr.RepositoryException
      • getArguments

        String[] getArguments()
                       throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • getArgumentCount

        int getArgumentCount()
                      throws javax.jcr.RepositoryException
        This addition has no counterpart in JSR-283, JSR-283 only compliant applications have no means to query which parameters should be bound before a query can be executed. The extension of the HippoQuery class makes this possible.
        Returns:
        the number of bindable parameters in the stored query
        Throws:
        javax.jcr.RepositoryException - in case of an internal or connection error
      • execute

        javax.jcr.query.QueryResult execute​(Map<String,​String> arguments)
                                     throws javax.jcr.RepositoryException
        Convenience method to bind all arguments of a query using a single map and immediately execute the query. A JSR-283 only compliant application should use individual bindValue calls to bind each argument and then perform a no-argument execute call.
        Parameters:
        arguments - a map of string keys of the free varia
        Returns:
        the query result
        Throws:
        javax.jcr.RepositoryException - in case of an internal or connection error
      • bindValue

        void bindValue​(String varName,
                       javax.jcr.Value value)
                throws IllegalArgumentException,
                       javax.jcr.RepositoryException
        Specified by:
        bindValue in interface javax.jcr.query.Query
        Parameters:
        varName -
        value -
        Throws:
        IllegalArgumentException
        javax.jcr.RepositoryException