org.priha.query
Class SimpleQueryProvider
java.lang.Object
org.priha.query.aqt.DefaultQueryNodeVisitor
org.priha.query.aqt.TraversingQueryNodeVisitor
org.priha.query.SimpleQueryProvider
- All Implemented Interfaces:
- QueryNodeVisitor, QueryProvider
public class SimpleQueryProvider
- extends TraversingQueryNodeVisitor
- implements QueryProvider
This class provides a very simple query provider which does direct
comparisons against the contents of the repository. The upside is that this
makes it very simple; with the obvious downside that this is really slow
because it traverses the entire repository one matched Node at a time.
- Author:
- Janne Jalkanen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleQueryProvider
public SimpleQueryProvider()
query
public javax.jcr.query.QueryResult query(SessionImpl session,
QueryRootNode root)
throws javax.jcr.RepositoryException
- Specified by:
query
in interface QueryProvider
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(AndQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class TraversingQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(OrderQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class DefaultQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(PathQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class TraversingQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(RelationQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class DefaultQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(LocationStepQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class TraversingQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(TextsearchQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class DefaultQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException
visit
public java.lang.Object visit(NodeTypeQueryNode node,
java.lang.Object data)
throws javax.jcr.RepositoryException
- //element(*,"nt:base")
- Specified by:
visit
in interface QueryNodeVisitor
- Overrides:
visit
in class DefaultQueryNodeVisitor
- Throws:
javax.jcr.RepositoryException