org.deegree.sqldialect.filter.expression
Class SQLOperation

java.lang.Object
  extended by org.deegree.sqldialect.filter.expression.SQLOperation
All Implemented Interfaces:
SQLExpression

public class SQLOperation
extends Object
implements SQLExpression

SQLExpression that represents an operation, e.g. an addition, an intersects predicate or a distance calculation.

Version:
$Revision: 31370 $, $Date: 2011-07-28 19:37:13 +0200 (Do, 28. Jul 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
SQLOperation(List<Object> particles)
           
 
Method Summary
 void cast(SQLExpression expr)
          Propagates type information to this expression (=performs a type cast).
 List<SQLArgument> getArguments()
          Returns the SQLArgument instances that occur in the expression, in same order as in the SQL snippet.
 ParticleConverter getConverter()
          Returns the attached particle converter for this expression.
 CRS getCRS()
          Returns the CRS of the expression (only for spatial ones).
 PrimitiveType getPrimitiveType()
          Returns the primitive type of this expression.
 StringBuilder getSQL()
          Returns the corresponding SQL snippet, with question marks for every SQLArgument argument (as required for JDBC PreparedStatements).
 String getSRID()
          Returns the databases' SRID of the expression (only for spatial ones).
 boolean isMultiValued()
          Returns whether the expression has multiple values (currently this can only be a string column that stores multiple values in concatenated form).
 boolean isSpatial()
          Returns whether the expression denotes a spatial value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLOperation

public SQLOperation(List<Object> particles)
Method Detail

isSpatial

public boolean isSpatial()
Description copied from interface: SQLExpression
Returns whether the expression denotes a spatial value.

Specified by:
isSpatial in interface SQLExpression
Returns:
true, if the expression is spatial, false otherwise

isMultiValued

public boolean isMultiValued()
Description copied from interface: SQLExpression
Returns whether the expression has multiple values (currently this can only be a string column that stores multiple values in concatenated form).

Specified by:
isMultiValued in interface SQLExpression
Returns:
true, if the expresion is multi-valued, false otherwise

toString

public String toString()
Overrides:
toString in class Object

getArguments

public List<SQLArgument> getArguments()
Description copied from interface: SQLExpression
Returns the SQLArgument instances that occur in the expression, in same order as in the SQL snippet.

Specified by:
getArguments in interface SQLExpression
Returns:
the SQL literals, never null
See Also:
SQLExpression.getSQL()

getSQL

public StringBuilder getSQL()
Description copied from interface: SQLExpression
Returns the corresponding SQL snippet, with question marks for every SQLArgument argument (as required for JDBC PreparedStatements).

Specified by:
getSQL in interface SQLExpression
Returns:
the corresponding SQL snippet, never null
See Also:
SQLExpression.getArguments()

getCRS

public CRS getCRS()
Description copied from interface: SQLExpression
Returns the CRS of the expression (only for spatial ones).

Specified by:
getCRS in interface SQLExpression
Returns:
the CRS, can be null (unknown or not a spatial expression)

getSRID

public String getSRID()
Description copied from interface: SQLExpression
Returns the databases' SRID of the expression (only for spatial ones).

Specified by:
getSRID in interface SQLExpression
Returns:
the SRID, can be null (unknown or not a spatial expression)

getPrimitiveType

public PrimitiveType getPrimitiveType()
Description copied from interface: SQLExpression
Returns the primitive type of this expression.

Specified by:
getPrimitiveType in interface SQLExpression
Returns:
the primitive type, can be null (no type information / spatial)

cast

public void cast(SQLExpression expr)
Description copied from interface: SQLExpression
Propagates type information to this expression (=performs a type cast).

Specified by:
cast in interface SQLExpression
Parameters:
expr - type information to be applied, must not be null

getConverter

public ParticleConverter getConverter()
Description copied from interface: SQLExpression
Returns the attached particle converter for this expression.

Specified by:
getConverter in interface SQLExpression
Returns:
particle converter, can be null


Copyright © 2011. All Rights Reserved.