Package org.geotools.data.complex.config
Class JdbcMultipleValue
- Object
-
- ExpressionAbstract
-
- DefaultExpression
-
- AttributeExpressionImpl
-
- JdbcMultipleValue
-
- All Implemented Interfaces:
Expression
,PropertyName
,MultipleValue
public final class JdbcMultipleValue extends AttributeExpressionImpl implements MultipleValue
Implementation of the multivalued mappings API for JDBC based data sources.
-
-
Field Summary
-
Fields inherited from class AttributeExpressionImpl
attPath, lenient, namespaceSupport, schema
-
Fields inherited from interface Expression
NIL
-
-
Constructor Summary
Constructors Constructor Description JdbcMultipleValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accept(ExpressionVisitor visitor, Object extraData)
Used by FilterVisitors to perform some action on this filter instance.boolean
equals(Object o)
Compares this filter to the specified object.Object
evaluate(Object object)
Gets the value of this property from the passed object.<T> T
evaluate(Object object, Class<T> context)
Gets the value of this attribute from the passed object.AttributeMapping
getAttributeMapping()
FeatureTypeMapping
getFeatureTypeMapping()
String
getId()
Returns the ID of the multivalued mapping.String[]
getProperties()
String
getSourceColumn()
String
getTargetColumn()
String
getTargetTable()
Expression
getTargetValue()
List<Object>
getValues(Feature features, AttributeMapping attributeMapping)
Returns the values extracted from the provided feature using this multivalued mapping.int
hashCode()
Override of hashCode method.void
setAttributeMapping(AttributeMapping attributeMapping)
Sets the attribute type mapping that contains this multi valued mapping.void
setFeatureTypeMapping(FeatureTypeMapping featureTypeMapping)
Sets the feature type mapping that contains this multi valued mapping.void
setSourceColumn(String sourceColumn)
void
setTargetColumn(String targetColumn)
void
setTargetTable(String targetTable)
void
setTargetValue(String targetValue)
String
toString()
Return this expression as a string.-
Methods inherited from class AttributeExpressionImpl
getNamespaceContext, getPropertyName, isLenient, setLenient, setPropertyName
-
Methods inherited from class DefaultExpression
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
-
-
-
-
Method Detail
-
getSourceColumn
public String getSourceColumn()
-
setSourceColumn
public void setSourceColumn(String sourceColumn)
-
getTargetTable
public String getTargetTable()
-
setTargetTable
public void setTargetTable(String targetTable)
-
getTargetColumn
public String getTargetColumn()
-
setTargetColumn
public void setTargetColumn(String targetColumn)
-
getTargetValue
public Expression getTargetValue()
-
setTargetValue
public void setTargetValue(String targetValue)
-
getFeatureTypeMapping
public FeatureTypeMapping getFeatureTypeMapping()
-
setFeatureTypeMapping
public void setFeatureTypeMapping(FeatureTypeMapping featureTypeMapping)
Description copied from interface:MultipleValue
Sets the feature type mapping that contains this multi valued mapping.- Specified by:
setFeatureTypeMapping
in interfaceMultipleValue
-
getAttributeMapping
public AttributeMapping getAttributeMapping()
-
setAttributeMapping
public void setAttributeMapping(AttributeMapping attributeMapping)
Description copied from interface:MultipleValue
Sets the attribute type mapping that contains this multi valued mapping.- Specified by:
setAttributeMapping
in interfaceMultipleValue
-
getProperties
public String[] getProperties()
-
getValues
public List<Object> getValues(Feature features, AttributeMapping attributeMapping)
Description copied from interface:MultipleValue
Returns the values extracted from the provided feature using this multivalued mapping.- Specified by:
getValues
in interfaceMultipleValue
-
evaluate
public Object evaluate(Object object)
Description copied from class:AttributeExpressionImpl
Gets the value of this property from the passed object.- Specified by:
evaluate
in interfaceExpression
- Overrides:
evaluate
in classAttributeExpressionImpl
- Parameters:
object
- Object from which we need to extract a property value.- Returns:
- default implementation returns null
-
evaluate
public <T> T evaluate(Object object, Class<T> context)
Description copied from class:AttributeExpressionImpl
Gets the value of this attribute from the passed object.- Specified by:
evaluate
in interfaceExpression
- Overrides:
evaluate
in classAttributeExpressionImpl
- Type Parameters:
T
- The type of the returned object.- Parameters:
object
- Object from which to extract attribute value.context
- Target Class- Returns:
- Evaluates the given expression based on the content of the given object an an
instance of
context
.
-
accept
public Object accept(ExpressionVisitor visitor, Object extraData)
Description copied from class:AttributeExpressionImpl
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.- Specified by:
accept
in interfaceExpression
- Overrides:
accept
in classAttributeExpressionImpl
- Parameters:
visitor
- The visitor which requires access to this filter, the method must call visitor.visit(this);
-
getId
public String getId()
Description copied from interface:MultipleValue
Returns the ID of the multivalued mapping.- Specified by:
getId
in interfaceMultipleValue
-
equals
public boolean equals(Object o)
Description copied from class:AttributeExpressionImpl
Compares this filter to the specified object. Returns true if the passed in object is the same as this expression. Checks to make sure the expression types are the same as well as the attribute paths and schemas.- Overrides:
equals
in classAttributeExpressionImpl
- Parameters:
o
- - the object to compare this ExpressionAttribute against.- Returns:
- true if specified object is equal to this filter; else false
-
hashCode
public int hashCode()
Description copied from class:AttributeExpressionImpl
Override of hashCode method.- Overrides:
hashCode
in classAttributeExpressionImpl
- Returns:
- a code to hash this object by.
-
toString
public String toString()
Description copied from class:AttributeExpressionImpl
Return this expression as a string.- Overrides:
toString
in classAttributeExpressionImpl
- Returns:
- String representation of this attribute expression.
-
-