| 1 16 package org.outerj.daisy.query.model; 17 18 import org.outerj.daisy.repository.Document; 19 import org.outerj.daisy.repository.Version; 20 import org.outerj.daisy.repository.query.QueryException; 21 import org.outerj.daisy.repository.query.EvaluationContext; 22 import org.outerj.daisy.query.QueryContext; 23 24 import java.sql.PreparedStatement ; 25 import java.sql.SQLException ; 26 import java.util.Locale ; 27 28 31 public interface ValueExpr extends Expression { 32 35 void prepare(QueryContext context) throws QueryException; 36 37 44 Object evaluate(QValueType valueType, EvaluationContext evaluationContext) throws QueryException; 45 46 51 Object evaluate(QValueType valueType, Document document, Version version, EvaluationContext evaluationContext) throws QueryException; 52 53 56 QValueType getValueType(); 57 58 67 boolean isSymbolicIdentifier(); 68 69 73 Object translateSymbolic(ValueExpr valueExpr, EvaluationContext evaluationContext) throws QueryException; 74 75 boolean isMultiValue(); 76 77 83 boolean isOutputOnly(); 84 85 89 AclConditionViolation isAclAllowed(); 90 91 99 String getSqlPreConditions(SqlGenerationContext context) throws QueryException; 100 101 106 void generateSqlValueExpr(StringBuffer sql, SqlGenerationContext context) throws QueryException; 107 108 int bindPreConditions(PreparedStatement stmt, int bindPos) throws SQLException , QueryException; 109 110 int bindValueExpr(PreparedStatement stmt, int bindPos, QValueType valueType, 111 EvaluationContext evaluationContext) throws SQLException , QueryException; 112 113 String getTitle(Locale locale); 114 115 119 String getExpression(); 120 121 125 QValueType getOutputValueType(); 126 127 133 Object getOutputValue(Document document, Version version, EvaluationContext evaluationContext) throws QueryException; 134 135 boolean canTestAppliesTo(); 136 } 137 | Popular Tags |