Package org.geotools.filter.function
Class NowFunction
- All Implemented Interfaces:
Expression
,Function
,FunctionExpression
,Factory
Return the current time as a Date. When evaluated directly, it returns a new value at each invocation. When evaluated
as part of a filter against a DataStore, the value might be one, and fixed, during the data access. For example:
- If the datastore uses
SimplifyingFilterVisitor
, the function will be called once, and replaced with the returned value - If the datastore encodes the function down in a native query language, the value could also be the same for all processed features. For example, the PostgreSQL now function always returns the time at the beginning of the current transaction, to give a consistent notion of current time across it.
-
Field Summary
FieldsFields inherited from class FunctionExpressionImpl
fallback, functionName, name, params
Fields inherited from interface Expression
NIL
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FunctionExpressionImpl
accept, equals, functionName, getExpression, getFallbackValue, getFunctionName, getImplementationHints, getName, getParameters, hashCode, setFallbackValue, setParameters
Methods inherited from class DefaultExpression
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
Methods inherited from class ExpressionAbstract
evaluate
Methods inherited from interface Expression
evaluate
-
Field Details
-
NAME
-
-
Constructor Details
-
NowFunction
public NowFunction()
-
-
Method Details
-
toString
Description copied from class:FunctionExpressionImpl
Creates a String representation of this Function with the function name and the arguments. The String created should be good for most subclasses- Overrides:
toString
in classFunctionExpressionImpl
-
evaluate
Description copied from class:ExpressionAbstract
Subclass should override, default implementation returns null.- Specified by:
evaluate
in interfaceExpression
- Overrides:
evaluate
in classFunctionExpressionImpl
- Returns:
- default implementation returns null
-