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 long
For 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, toValueType
Methods inherited from class org.apache.sis.filter.LeafExpression
getParameters
Methods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warning
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sis.filter.Expression
getParameters
Methods inherited from interface org.apache.sis.internal.feature.FeatureExpression
getValueClass
Methods 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 benull
if 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 allowingSQLStore
to put the column name in the SQLWHERE
clause. It makes the difference between using or not the database index.- Specified by:
optimize
in interfaceOptimization.OnExpression<AbstractFeature,
Object> - Specified by:
optimize
in classPropertyValue<Object>
- Parameters:
optimization
- the simplifications or optimizations to apply on this expression.- Returns:
- the simplified or optimized expression, or
this
if no optimization has been applied.
-