|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.daisy.query.model.Identifier
public final class Identifier
Constructor Summary | |
---|---|
|
Identifier(java.lang.String id)
|
protected |
Identifier(java.lang.String id,
QueryContext context,
org.outerj.daisy.query.model.Identifier.DelegateIdentifier delegate)
|
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()
Must only be implemented by classes for which isAclAllowed returns null. |
protected java.lang.Object |
clone()
|
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. |
int |
getColumn()
|
org.outerj.daisy.query.model.Identifier.DelegateIdentifier |
getDelegate()
|
java.lang.String |
getExpression()
Get a textual representation of this expression, i.e. |
int |
getLine()
|
java.lang.String |
getLocation()
|
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 ValueExpr.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 ValueExpr.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()
May this identifier be used in ACL evaluation expressions? |
boolean |
isComparable()
|
boolean |
isMultiValue()
|
boolean |
isOutputOnly()
If true, then this identifier does not present a field on which can be searched, and only the method getOutputValue should be called on it. |
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. |
void |
setLocation(int line,
int column)
|
java.lang.Object |
translateSymbolic(ValueExpr valueExpr,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
See ValueExpr.isSymbolicIdentifier() . |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Identifier(java.lang.String id)
protected Identifier(java.lang.String id, QueryContext context, org.outerj.daisy.query.model.Identifier.DelegateIdentifier delegate)
Method Detail |
---|
protected java.lang.Object clone()
clone
in class java.lang.Object
public void setLocation(int line, int column)
setLocation
in interface Expression
public java.lang.String getLocation()
getLocation
in interface Expression
public int getLine()
getLine
in interface Expression
public int getColumn()
getColumn
in interface Expression
public void prepare(QueryContext context) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
prepare
in interface ValueExpr
org.outerj.daisy.repository.query.QueryException
public java.lang.Object evaluate(QValueType valueType, org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
ValueExpr
evaluate
in interface ValueExpr
valueType
- Indicates the type of object to return. This parameter only matters whenpublic 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
ValueExpr
evaluate
in interface ValueExpr
org.outerj.daisy.repository.query.QueryException
public java.lang.String getSqlPreConditions(SqlGenerationContext context) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
ValueExpr.generateSqlValueExpr(StringBuffer, SqlGenerationContext)
).
Should throw an exception if this is an output-only ValueExpr.
getSqlPreConditions
in interface ValueExpr
org.outerj.daisy.repository.query.QueryException
public void generateSqlValueExpr(java.lang.StringBuffer sql, SqlGenerationContext context) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
Should throw an exception if this is an output-only ValueExpr.
generateSqlValueExpr
in interface ValueExpr
org.outerj.daisy.repository.query.QueryException
public int bindPreConditions(java.sql.PreparedStatement stmt, int bindPos) throws java.sql.SQLException, org.outerj.daisy.repository.query.QueryException
bindPreConditions
in interface ValueExpr
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException
public 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
bindValueExpr
in interface ValueExpr
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException
public QValueType getValueType()
ValueExpr
getValueType
in interface ValueExpr
public boolean isMultiValue()
isMultiValue
in interface ValueExpr
public boolean isComparable()
public QValueType getOutputValueType()
ValueExpr
ValueExpr.getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext)
method.
getOutputValueType
in interface ValueExpr
public final java.lang.Object getOutputValue(org.outerj.daisy.repository.Document document, org.outerj.daisy.repository.Version version, org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
ValueExpr
ValueExpr.evaluate(QValueType, org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext)
.
The version is allowed to be null.
getOutputValue
in interface ValueExpr
public java.lang.String getTitle(java.util.Locale locale)
getTitle
in interface ValueExpr
public java.lang.String getExpression()
ValueExpr
getExpression
in interface ValueExpr
public AclConditionViolation isAclAllowed()
isAclAllowed
in interface ValueExpr
public boolean canTestAppliesTo()
canTestAppliesTo
in interface ValueExpr
public boolean isSymbolicIdentifier()
ValueExpr
If this method returns true, then ValueExpr.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.
isSymbolicIdentifier
in interface ValueExpr
public java.lang.Object translateSymbolic(ValueExpr valueExpr, org.outerj.daisy.repository.query.EvaluationContext evaluationContext) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
ValueExpr.isSymbolicIdentifier()
. This method should only be called
if ValueExpr.isSymbolicIdentifier()
returns true.
translateSymbolic
in interface ValueExpr
org.outerj.daisy.repository.query.QueryException
public boolean isOutputOnly()
isOutputOnly
in interface ValueExpr
public org.outerj.daisy.query.model.Identifier.DelegateIdentifier getDelegate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |