Package org.apache.sis.filter
Class PropertyValue.AsObject
java.lang.Object
- All Implemented Interfaces:
Serializable,Function<AbstractFeature,,Object> Expression<AbstractFeature,,Object> Optimization.OnExpression<AbstractFeature,,Object> FeatureExpression<AbstractFeature,,Object> ValueReference<AbstractFeature,Object>
- Enclosing class:
- PropertyValue<V>
An expression fetching property values as
Object.
This expression does not need to apply any type conversion.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.filter.LeafExpression
LeafExpression.Literal<R,V>, LeafExpression.Transformed<R, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.filter.PropertyValue
isVirtual, name, VIRTUAL_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(AbstractFeature instance) Returns the value of the property of the name given at construction time.optimize(Optimization optimization) If the evaluated property is a link, replaces this expression by a more direct reference to the target property.Methods inherited from class org.apache.sis.filter.PropertyValue
create, expectedType, expectedType, getChildren, getFunctionName, getSourceClass, getXPath, toValueTypeMethods inherited from class org.apache.sis.filter.LeafExpression
getParametersMethods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warningMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.filter.Expression
getParametersMethods inherited from interface org.apache.sis.internal.feature.FeatureExpression
getValueClassMethods inherited from interface org.apache.sis.filter.Optimization.OnExpression
recreate
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
AsObject
AsObject(String name, boolean isVirtual) Creates a new expression retrieving values from a property of the given name.
-
-
Method Details
-
apply
Returns the value of the property of the name given at construction time. If no value is found for the given feature, then this method returnsnull.- Parameters:
instance- the object to be evaluated by the expression. Can benullif this expression allows null values.- Returns:
- value computed by the expression.
-
optimize
If the evaluated property is a link, replaces this expression by a more direct reference to the target property. This optimization is important for allowingSQLStoreto put the column name in the SQLWHEREclause. It makes the difference between using or not the database index.- Specified by:
optimizein interfaceOptimization.OnExpression<AbstractFeature,Object> - Specified by:
optimizein classPropertyValue<Object>- Parameters:
optimization- the simplifications or optimizations to apply on this expression.- Returns:
- the simplified or optimized expression, or
thisif no optimization has been applied.
-