org.outerj.daisy.query.model
Interface CondExpr

All Known Implementing Classes:
AbstractMultiArgCond, AlwaysSatisfiedCond, And, Between, DoesNotHaveVariant, HasPart, HasPartWithMimeType, InCollection, IsLinked, IsNotNull, IsNull, Like, LinksToOrFrom, Or, UnaryCondExpr

public interface CondExpr

Interface for conditional expressions, i.e. those used in the "where" part of a query.


Method Summary
 Tristate appliesTo(long documentType, long collection)
          Checks if this conditionl expression could evaluate to true for a document which has the given documentType id and collection id.
 int bindSql(java.sql.PreparedStatement stmt, int bindPos)
           
 boolean evaluate(org.outerj.daisy.repository.Document document)
           
 void generateSql(java.lang.StringBuffer sql, SqlGenerationContext context)
           
 AclConditionViolation isAclAllowed()
          Checks if this CondExpr only uses stuff allowed in ACL object conditions.
 void prepare(QueryContext context)
           
 

Method Detail

prepare

public void prepare(QueryContext context)
             throws QueryException
Throws:
QueryException

evaluate

public boolean evaluate(org.outerj.daisy.repository.Document document)
                 throws QueryException
Throws:
QueryException

generateSql

public void generateSql(java.lang.StringBuffer sql,
                        SqlGenerationContext context)
                 throws QueryException
Throws:
QueryException

bindSql

public int bindSql(java.sql.PreparedStatement stmt,
                   int bindPos)
            throws java.sql.SQLException
Parameters:
bindPos - the binding position on which to bind the next value
Returns:
the next binding position
Throws:
java.sql.SQLException

isAclAllowed

public AclConditionViolation isAclAllowed()
Checks if this CondExpr only uses stuff allowed in ACL object conditions. Returns null if successfull.


appliesTo

public Tristate appliesTo(long documentType,
                          long collection)
Checks if this conditionl expression could evaluate to true for a document which has the given documentType id and collection id. The collection id is optional, specify -1 to ignore.

The result can be:



Copyright © -2005 . All Rights Reserved.