Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.expressions.spatial
Class SpatialParameters

java.lang.Object
  extended by org.eclipse.persistence.expressions.spatial.SpatialParameters


public class SpatialParameters
extends java.lang.Object

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.

Since:
Oracle TopLink 11.1.1.0.0

Nested Class Summary
static class SpatialParameters.Mask
           
static class SpatialParameters.QueryType
           
static class SpatialParameters.Units
           

 

Field Summary
private  java.lang.Number distance
           
private static java.lang.String DISTANCE_PARAM
           
private static java.lang.String MASK_PARAM
           
private  SpatialParameters.Mask[] masks
           
private static java.lang.String MAX_RES_PARAM
           
private  java.lang.Number maxResolution
           
private static java.lang.String MIN_RES_PARAM
           
private  java.lang.Number minResolution
           
private  java.lang.String params
           
private  SpatialParameters.QueryType queryType
           
private static java.lang.String QUERYTYPE_PARAM
           
private static java.lang.String UNIT_PARAM
           
private  SpatialParameters.Units units
           

 

Constructor Summary
SpatialParameters()
           
SpatialParameters(java.lang.String params)
           

 

Method Summary
 java.lang.Number getDistance()
           
 SpatialParameters.Mask[] getMasks()
           
 java.lang.Number getMaxResolution()
           
 java.lang.Number getMinResolution()
           
 java.lang.String getParameterString()
          PUBLIC: build a String describing this set of parameters that can be used in conjunction with an Oracle Spatial function
 java.lang.String getParams()
           
 SpatialParameters.QueryType getQueryType()
           
 SpatialParameters.Units getUnits()
           
 SpatialParameters setDistance(java.lang.Number distance)
          PUBLIC: Set the DISTANCE parameter
 SpatialParameters setMask(SpatialParameters.Mask mask)
          PUBLIC: Set the MASK parameter
 SpatialParameters setMasks(SpatialParameters.Mask[] masks)
          PUBLIC: Set the MASK parameter
 SpatialParameters setMaxResolution(java.lang.Number maxResolution)
          PUBLIC: Set the MAX_RESOLUTION parameter
 SpatialParameters setMinResolution(java.lang.Number minResolution)
          PUBLIC: Set the MIN_RESOLUTION parameter
 SpatialParameters setParams(java.lang.String params)
          PUBLIC: Set the PARAMS (String) value.
 SpatialParameters setQueryType(SpatialParameters.QueryType queryType)
          PUBLIC: Set the QUERY_TYPE parameter
 SpatialParameters setUnits(SpatialParameters.Units units)
          PUBLIC: Set the UNIT parameter
private  boolean writeParam(java.io.StringWriter writer, java.lang.String paramName, java.lang.Object paramValue, boolean hasParams)
          INTERNAL: Write the parameter onto the StringWriter being used to construct the params string.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

params

private java.lang.String params

minResolution

private java.lang.Number minResolution

maxResolution

private java.lang.Number maxResolution

units

private SpatialParameters.Units units

distance

private java.lang.Number distance

queryType

private SpatialParameters.QueryType queryType

masks

private SpatialParameters.Mask[] masks

UNIT_PARAM

private static java.lang.String UNIT_PARAM

MAX_RES_PARAM

private static java.lang.String MAX_RES_PARAM

MIN_RES_PARAM

private static java.lang.String MIN_RES_PARAM

DISTANCE_PARAM

private static java.lang.String DISTANCE_PARAM

QUERYTYPE_PARAM

private static java.lang.String QUERYTYPE_PARAM

MASK_PARAM

private static java.lang.String MASK_PARAM

Constructor Detail

SpatialParameters

public SpatialParameters()

SpatialParameters

public SpatialParameters(java.lang.String params)

Method Detail

setParams

public SpatialParameters setParams(java.lang.String params)
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

public java.lang.String getParams()

setMinResolution

public SpatialParameters setMinResolution(java.lang.Number minResolution)
PUBLIC: Set the MIN_RESOLUTION parameter
Parameters:
minResolution -
Returns:
this instance of SpatialParameters

getMinResolution

public java.lang.Number getMinResolution()

setMaxResolution

public SpatialParameters setMaxResolution(java.lang.Number maxResolution)
PUBLIC: Set the MAX_RESOLUTION parameter
Parameters:
maxResolution -
Returns:
this instance of SpatialParameters

getMaxResolution

public java.lang.Number getMaxResolution()

setUnits

public SpatialParameters setUnits(SpatialParameters.Units units)
PUBLIC: Set the UNIT parameter
Parameters:
units - a value from the SpatialParameters.Units enum
Returns:
this instance of SpatialParameters

getUnits

public SpatialParameters.Units getUnits()

setDistance

public SpatialParameters setDistance(java.lang.Number distance)
PUBLIC: Set the DISTANCE parameter
Parameters:
distance -
Returns:
this instance of SpatialParameters

getDistance

public java.lang.Number getDistance()

setQueryType

public SpatialParameters setQueryType(SpatialParameters.QueryType queryType)
PUBLIC: Set the QUERY_TYPE parameter
Parameters:
queryType - a value from the SpatialParameters.QueryType enum
Returns:
this instance of SpatialParameters

getQueryType

public SpatialParameters.QueryType getQueryType()

setMasks

public SpatialParameters setMasks(SpatialParameters.Mask[] masks)
PUBLIC: Set the MASK parameter
Parameters:
masks - an array of values from the SpatialParmeters.Mask enum
Returns:
this instance of SpatialParameters

setMask

public SpatialParameters setMask(SpatialParameters.Mask mask)
PUBLIC: Set the MASK parameter
Parameters:
mask - a value from the SpatialParmeters.Mask enum
Returns:
this instance of SpatialParameters

getMasks

public SpatialParameters.Mask[] getMasks()

getParameterString

public java.lang.String getParameterString()
PUBLIC: build a String describing this set of parameters that can be used in conjunction with an Oracle Spatial function
Returns:

writeParam

private boolean writeParam(java.io.StringWriter writer,
                           java.lang.String paramName,
                           java.lang.Object paramValue,
                           boolean hasParams)
INTERNAL: Write the parameter onto the StringWriter being used to construct the params string. Only write something if there is a value and return true indicating if a parameter is written.

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.