Top Description Constructors Methods
org.eclipse.persistence.expressions.spatial

public final Class SpatialExpressionFactory

extends Object
Class Inheritance
Imports
java.util.List, .Vector, org.eclipse.persistence.expressions.Expression, .ExpressionOperator, org.eclipse.persistence.internal.expressions.FunctionExpression

This class is used to construct expressions that use Oracle Spatial operators
ExpressionBuilder builder = new ExpressionBuilder();
Expression withinDistance = SpatialExpressions.withinDistance(myJGeometry1, myJGeometry2, "DISTANCE=10");
session.readAllObjects(GeometryHolder.class, withinDistance);
Since
Oracle TopLink 11.1.1.0.0

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Expression

Returns:

a TopLink Expression
filter
(Expression
an Expression representing a JGeometryObject
geom1
,
Object
a JGeometryObject or an Expression representing a JGeometryObject
geom2
,
SpatialParameters
a SpatialParameters object configured with the parameters to the call
params
)

PUBLIC: Return an Expression for the MDSYS.SDO_FILTER Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters.setQueryType(QueryType.WINDOW);
Expression selectCriteria = SpatialExpressions.filter(jGeometry1, jGeometry2, parameters);
public static Expression
getSpatialExpression(int
the ordinal of the operator
operator
,
Expression geom1, Object geom2, String params)

INTERNAL: A utility method to build a SpatialExpression

public static Expression

Returns:

a TopLink Expression
nearestNeighbor
(Expression
an Expression representing a JGeometryObject
geom1
,
Object
a JGeometryObject or an Expression representing a JGeometryObject
geom2
,
SpatialParameters
a SpatialParameters object configured with the parameters to the call
params
)

PUBLIC: Return an Expression for the MDSYS.SDO_NN Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters.setUnit(Units.M);
Expression selectCriteria = SpatialExpressions.nearestNeighbor(jGeometry1, jGeometry2, parameters);
public static Expression

Returns:

a TopLink Expression
relate
(Expression
an Expression representing a JGeometryObject
geom1
,
Object
a JGeometryObject or an Expression representing a JGeometryObject
geom2
,
SpatialParameters
a SpatialParameters object configured with the parameters to the call
params
)

PUBLIC: Return an Expression for the MDSYS.MDSYS.SDO_RELATE Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters..setMask(Mask.ANYINTERACT).setQueryType(QueryType.WINDOW);
Expression selectCriteria = SpatialExpressions.relate(jGeometry1, jGeometry2, parameters);
public static Expression

Returns:

a TopLink Expression
withinDistance
(Expression
an Expression representing a JGeometryObject
geom1
,
Object
a JGeometryObject or an Expression representing a JGeometryObject
geom2
,
SpatialParameters
a SpatialParameters object configured with the parameters to the call
params
)

PUBLIC: Return an Expression for the MDSYS.SDO_WITHIN_DISTANCE Spatial Operator on the Oracle Database Use of this expression requires the Java spatial classes

 SpatialParameters parameters = new SpatialParameters();
parameters.setDistance(10d);
 Expression selectCriteria = SpatialExpressions.withinDistance(jGeometry1, jGeometry2, parameters);
 
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SpatialExpressionFactoryback to summary
private SpatialExpressionFactory()

Method Detail

filterback to summary
public static Expression filter(Expression geom1, Object geom2, SpatialParameters params)

PUBLIC: Return an Expression for the MDSYS.SDO_FILTER Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters.setQueryType(QueryType.WINDOW);
Expression selectCriteria = SpatialExpressions.filter(jGeometry1, jGeometry2, parameters);
Parameters
geom1:Expression

an Expression representing a JGeometryObject

geom2:Object

a JGeometryObject or an Expression representing a JGeometryObject

params:SpatialParameters

a SpatialParameters object configured with the parameters to the call

Returns:Expression

a TopLink Expression

getSpatialExpressionback to summary
public static Expression getSpatialExpression(int operator, Expression geom1, Object geom2, String params)

INTERNAL: A utility method to build a SpatialExpression

Parameters
operator:int

the ordinal of the operator

nearestNeighborback to summary
public static Expression nearestNeighbor(Expression geom1, Object geom2, SpatialParameters params)

PUBLIC: Return an Expression for the MDSYS.SDO_NN Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters.setUnit(Units.M);
Expression selectCriteria = SpatialExpressions.nearestNeighbor(jGeometry1, jGeometry2, parameters);
Parameters
geom1:Expression

an Expression representing a JGeometryObject

geom2:Object

a JGeometryObject or an Expression representing a JGeometryObject

params:SpatialParameters

a SpatialParameters object configured with the parameters to the call

Returns:Expression

a TopLink Expression

relateback to summary
public static Expression relate(Expression geom1, Object geom2, SpatialParameters params)

PUBLIC: Return an Expression for the MDSYS.MDSYS.SDO_RELATE Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes

SpatialParameters parameters = new SpatialParameters();
parameters..setMask(Mask.ANYINTERACT).setQueryType(QueryType.WINDOW);
Expression selectCriteria = SpatialExpressions.relate(jGeometry1, jGeometry2, parameters);
Parameters
geom1:Expression

an Expression representing a JGeometryObject

geom2:Object

a JGeometryObject or an Expression representing a JGeometryObject

params:SpatialParameters

a SpatialParameters object configured with the parameters to the call

Returns:Expression

a TopLink Expression

withinDistanceback to summary
public static Expression withinDistance(Expression geom1, Object geom2, SpatialParameters params)

PUBLIC: Return an Expression for the MDSYS.SDO_WITHIN_DISTANCE Spatial Operator on the Oracle Database Use of this expression requires the Java spatial classes

 SpatialParameters parameters = new SpatialParameters();
parameters.setDistance(10d);
 Expression selectCriteria = SpatialExpressions.withinDistance(jGeometry1, jGeometry2, parameters);
 
Parameters
geom1:Expression

an Expression representing a JGeometryObject

geom2:Object

a JGeometryObject or an Expression representing a JGeometryObject

params:SpatialParameters

a SpatialParameters object configured with the parameters to the call

Returns:Expression

a TopLink Expression