org.outerj.daisy.query.model
Class HasAll

java.lang.Object
  extended by org.outerj.daisy.query.model.AbstractPredicateExpr
      extended by org.outerj.daisy.query.model.AbstractMultiArgPredicate
          extended by org.outerj.daisy.query.model.HasAll
All Implemented Interfaces:
Expression, PredicateExpr

public class HasAll
extends AbstractMultiArgPredicate


Field Summary
 
Fields inherited from class org.outerj.daisy.query.model.AbstractMultiArgPredicate
identifier, literals, valueType
 
Constructor Summary
HasAll(Identifier identifier, boolean exactCount)
           
 
Method Summary
 Tristate appliesTo(org.outerj.daisy.repository.Document document)
          Checks if this conditionl expression could evaluate to true for a document, without really knowing everything about the document.
 int bindSql(java.sql.PreparedStatement stmt, int bindPos, org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
           
 boolean evaluate(org.outerj.daisy.repository.Document document, org.outerj.daisy.repository.Version version, org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
          Evaluates the expression for the given document and version.
 void generateSql(java.lang.StringBuffer sql, SqlGenerationContext context)
           
 AclConditionViolation isAclAllowed()
          Checks if this PredicateExpr only uses stuff allowed in ACL object conditions.
 void prepare(QueryContext context)
          Needs to be called before usage of other methods.
 
Methods inherited from class org.outerj.daisy.query.model.AbstractMultiArgPredicate
add
 
Methods inherited from class org.outerj.daisy.query.model.AbstractPredicateExpr
getColumn, getLine, getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HasAll

public HasAll(Identifier identifier,
              boolean exactCount)
Method Detail

prepare

public void prepare(QueryContext context)
             throws org.outerj.daisy.repository.query.QueryException
Description copied from interface: PredicateExpr
Needs to be called before usage of other methods.

Specified by:
prepare in interface PredicateExpr
Overrides:
prepare in class AbstractMultiArgPredicate
Throws:
org.outerj.daisy.repository.query.QueryException

evaluate

public boolean evaluate(org.outerj.daisy.repository.Document document,
                        org.outerj.daisy.repository.Version version,
                        org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
                 throws org.outerj.daisy.repository.query.QueryException
Description copied from interface: PredicateExpr
Evaluates the expression for the given document and version. The version parameter is allowed to be null, in which case version-dependent information will be retrieved from the document object.

Throws:
org.outerj.daisy.repository.query.QueryException

generateSql

public void generateSql(java.lang.StringBuffer sql,
                        SqlGenerationContext context)
                 throws org.outerj.daisy.repository.query.QueryException
Throws:
org.outerj.daisy.repository.query.QueryException

bindSql

public int bindSql(java.sql.PreparedStatement stmt,
                   int bindPos,
                   org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
            throws java.sql.SQLException,
                   org.outerj.daisy.repository.query.QueryException
bindPos - the binding position on which to bind the next value
Returns:
the next binding position
Throws:
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException

isAclAllowed

public AclConditionViolation isAclAllowed()
Description copied from interface: PredicateExpr
Checks if this PredicateExpr only uses stuff allowed in ACL object conditions. Returns null if successfull.


appliesTo

public Tristate appliesTo(org.outerj.daisy.repository.Document document)
Description copied from interface: PredicateExpr
Checks if this conditionl expression could evaluate to true for a document, without really knowing everything about the document. The supplied Document object only needs to return the document type and collections, the other methods do not need to be implemented.

The result can be:



Copyright © -2012 . All Rights Reserved.