Class SpatialParameters
java.lang.Object
org.eclipse.persistence.expressions.spatial.SpatialParameters
PUBLIC:
A utility class used to set parameters on spatial operators within TopLink's
expression framework. This class allows the aptial operator parameters to be
passed in directly as a string or to be programatically configured using the
attributes defined and the enum types. Each spatial operator offers different
parameter arguments and values. This class does not enforce these rules but
instead leaves it to the caller to decide what values they want included.
When providing the parameter string through setParams or the constructor none of the other values will be used. Instead the string as provided will be used.
Creating an instance of SpatialParameters without configuring it and passing it into the SpatialExpressionFactory call is equivalent to passing in null. The resulting SQL will have NULL writen out for the parameters argument to the spatial operator.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMasks()
PUBLIC: build a String describing this set of parameters that can be used in conjunction with an Oracle Spatial functiongetUnits()
setDistance
(Number distance) PUBLIC: Set the DISTANCE parameterPUBLIC: Set the MASK parametersetMasks
(SpatialParameters.Mask[] masks) PUBLIC: Set the MASK parametersetMaxResolution
(Number maxResolution) PUBLIC: Set the MAX_RESOLUTION parametersetMinResolution
(Number minResolution) PUBLIC: Set the MIN_RESOLUTION parameterPUBLIC: Set the PARAMS (String) value.setQueryType
(SpatialParameters.QueryType queryType) PUBLIC: Set the QUERY_TYPE parametersetUnits
(SpatialParameters.Units units) PUBLIC: Set the UNIT parameter
-
Constructor Details
-
SpatialParameters
public SpatialParameters() -
SpatialParameters
-
-
Method Details
-
setParams
PUBLIC: Set the PARAMS (String) value. If this value is set then no other param values will be used.- Parameters:
params
-- Returns:
- this instance of SpatialParameters
-
getParams
-
setMinResolution
PUBLIC: Set the MIN_RESOLUTION parameter- Parameters:
minResolution
-- Returns:
- this instance of SpatialParameters
-
getMinResolution
-
setMaxResolution
PUBLIC: Set the MAX_RESOLUTION parameter- Parameters:
maxResolution
-- Returns:
- this instance of SpatialParameters
-
getMaxResolution
-
setUnits
PUBLIC: Set the UNIT parameter- Parameters:
units
- a value from the SpatialParameters.Units enum- Returns:
- this instance of SpatialParameters
-
getUnits
-
setDistance
PUBLIC: Set the DISTANCE parameter- Parameters:
distance
-- Returns:
- this instance of SpatialParameters
-
getDistance
-
setQueryType
PUBLIC: Set the QUERY_TYPE parameter- Parameters:
queryType
- a value from the SpatialParameters.QueryType enum- Returns:
- this instance of SpatialParameters
-
getQueryType
-
setMasks
PUBLIC: Set the MASK parameter- Parameters:
masks
- an array of values from the SpatialParmeters.Mask enum- Returns:
- this instance of SpatialParameters
-
setMask
PUBLIC: Set the MASK parameter- Parameters:
mask
- a value from the SpatialParmeters.Mask enum- Returns:
- this instance of SpatialParameters
-
getMasks
-
getParameterString
PUBLIC: build a String describing this set of parameters that can be used in conjunction with an Oracle Spatial function- Returns:
-