|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValueExpr
An expression which evaluates to some value.
Method Summary | |
---|---|
int |
bindPreConditions(java.sql.PreparedStatement stmt,
int bindPos)
|
int |
bindValueExpr(java.sql.PreparedStatement stmt,
int bindPos,
QValueType valueType,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
|
boolean |
canTestAppliesTo()
|
java.lang.Object |
evaluate(QValueType valueType,
org.outerj.daisy.repository.Document document,
org.outerj.daisy.repository.Version version,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
Evaluates this expression for the given document and/or version. |
java.lang.Object |
evaluate(QValueType valueType,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
Evaluates the expression without access to document information. |
void |
generateSqlValueExpr(java.lang.StringBuffer sql,
SqlGenerationContext context)
Generates the SQL for this expression. |
java.lang.String |
getExpression()
Get a textual representation of this expression, i.e. |
java.lang.Object |
getOutputValue(org.outerj.daisy.repository.Document document,
org.outerj.daisy.repository.Version version,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
Returns the output value of this identifier for the given document and version. |
QValueType |
getOutputValueType()
Identifies the type of data returned from the getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext) method. |
java.lang.String |
getSqlPreConditions(SqlGenerationContext context)
Generates any SQL conditions needed outside of the main value expression (which is generated using generateSqlValueExpr(StringBuffer, SqlGenerationContext) ). |
java.lang.String |
getTitle(java.util.Locale locale)
|
QValueType |
getValueType()
Returns the ValueType of this expression, or null if undetermined. |
AclConditionViolation |
isAclAllowed()
Returns non-null if this ValueExpr is not fitted for use in ACL document selection expressions. |
boolean |
isMultiValue()
|
boolean |
isOutputOnly()
Returns true for ValueExpr's which cannot be searched on (i.e. |
boolean |
isSymbolicIdentifier()
Returns true if this ValueExpr represents a symbolic identifier. |
void |
prepare(QueryContext context)
A method that should be called before any of the others. |
java.lang.Object |
translateSymbolic(ValueExpr valueExpr,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
See isSymbolicIdentifier() . |
Methods inherited from interface org.outerj.daisy.query.model.Expression |
---|
getColumn, getLine, getLocation, setLocation |
Method Detail |
---|
void prepare(QueryContext context) throws org.outerj.daisy.repository.query.QueryException
org.outerj.daisy.repository.query.QueryException
java.lang.Object evaluate(QValueType valueType, org.outerj.daisy.repository.query.EvaluationContext evaluationContext) throws org.outerj.daisy.repository.query.QueryException
valueType
- Indicates the type of object to return. This parameter only matters when
org.outerj.daisy.repository.query.QueryException
java.lang.Object evaluate(QValueType valueType, 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
org.outerj.daisy.repository.query.QueryException
QValueType getValueType()
boolean isSymbolicIdentifier()
If this method returns true, then translateSymbolic(org.outerj.daisy.query.model.ValueExpr, org.outerj.daisy.repository.query.EvaluationContext)
can
be called to convert the symbolic value to the test value.
java.lang.Object translateSymbolic(ValueExpr valueExpr, org.outerj.daisy.repository.query.EvaluationContext evaluationContext) throws org.outerj.daisy.repository.query.QueryException
isSymbolicIdentifier()
. This method should only be called
if isSymbolicIdentifier()
returns true.
org.outerj.daisy.repository.query.QueryException
boolean isMultiValue()
boolean isOutputOnly()
AclConditionViolation isAclAllowed()
java.lang.String getSqlPreConditions(SqlGenerationContext context) throws org.outerj.daisy.repository.query.QueryException
generateSqlValueExpr(StringBuffer, SqlGenerationContext)
).
Should throw an exception if this is an output-only ValueExpr.
org.outerj.daisy.repository.query.QueryException
void generateSqlValueExpr(java.lang.StringBuffer sql, SqlGenerationContext context) throws org.outerj.daisy.repository.query.QueryException
Should throw an exception if this is an output-only ValueExpr.
org.outerj.daisy.repository.query.QueryException
int bindPreConditions(java.sql.PreparedStatement stmt, int bindPos) throws java.sql.SQLException, org.outerj.daisy.repository.query.QueryException
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException
int bindValueExpr(java.sql.PreparedStatement stmt, int bindPos, QValueType valueType, org.outerj.daisy.repository.query.EvaluationContext evaluationContext) throws java.sql.SQLException, org.outerj.daisy.repository.query.QueryException
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException
java.lang.String getTitle(java.util.Locale locale)
java.lang.String getExpression()
QValueType getOutputValueType()
getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext)
method.
java.lang.Object getOutputValue(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
evaluate(QValueType, org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext)
.
The version is allowed to be null.
org.outerj.daisy.repository.query.QueryException
boolean canTestAppliesTo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |