|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.daisy.query.model.AbstractFunction
org.outerj.daisy.query.model.functions.CurrentDateTimeFunction
public class CurrentDateTimeFunction
Field Summary | |
---|---|
static java.lang.String |
NAME
|
Fields inherited from class org.outerj.daisy.query.model.AbstractFunction |
---|
params |
Constructor Summary | |
---|---|
CurrentDateTimeFunction()
|
Method Summary | |
---|---|
int |
bindValueExpr(java.sql.PreparedStatement stmt,
int bindPos,
QValueType valueType,
org.outerj.daisy.repository.query.EvaluationContext evaluationContext)
|
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. |
protected java.util.Date |
getDate(java.lang.String expression)
|
java.lang.String |
getFunctionName()
|
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 |
getTitle(java.util.Locale locale)
|
QValueType |
getValueType()
Returns the ValueType of this expression, or null if undetermined. |
protected int[] |
parseExpression(java.lang.String expression)
|
void |
prepare(QueryContext context)
A method that should be called before any of the others. |
Methods inherited from class org.outerj.daisy.query.model.AbstractFunction |
---|
addParam, bindPreConditions, canTestAppliesTo, getColumn, getExpression, getLine, getLocation, getParam, getSqlPreConditions, isAclAllowed, isMultiValue, isOutputOnly, isSymbolicIdentifier, setLocation, translateSymbolic |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
Constructor Detail |
---|
public CurrentDateTimeFunction()
Method Detail |
---|
public java.lang.String getFunctionName()
public void prepare(QueryContext context) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
prepare
in interface ValueExpr
prepare
in class AbstractFunction
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
generateSqlValueExpr
in class AbstractFunction
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
bindValueExpr
in class AbstractFunction
java.sql.SQLException
org.outerj.daisy.repository.query.QueryException
public java.lang.Object evaluate(QValueType valueType, org.outerj.daisy.repository.query.EvaluationContext evaluationContext) throws org.outerj.daisy.repository.query.QueryException
ValueExpr
valueType
- Indicates the type of object to return. This parameter only matters when
org.outerj.daisy.repository.query.QueryException
public 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
org.outerj.daisy.repository.query.QueryException
public QValueType getValueType()
ValueExpr
public java.lang.String getTitle(java.util.Locale locale)
public QValueType getOutputValueType()
ValueExpr
ValueExpr.getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version, EvaluationContext)
method.
public 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
ValueExpr
ValueExpr.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
protected java.util.Date getDate(java.lang.String expression) throws org.outerj.daisy.repository.query.QueryException
org.outerj.daisy.repository.query.QueryException
protected int[] parseExpression(java.lang.String expression) throws org.outerj.daisy.repository.query.QueryException
org.outerj.daisy.repository.query.QueryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |