org.deegree.sqldialect.filter.mssql
Class MSSQLWhereBuilder

java.lang.Object
  extended by org.deegree.sqldialect.filter.AbstractWhereBuilder
      extended by org.deegree.sqldialect.filter.mssql.MSSQLWhereBuilder

public class MSSQLWhereBuilder
extends AbstractWhereBuilder

AbstractWhereBuilder implementation for Microsoft SQL Server databases.

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

Field Summary
 
Fields inherited from class org.deegree.sqldialect.filter.AbstractWhereBuilder
aliasManager, dialect, filter, mapper, orderByClause, postFilter, postSortCrit, propNameMappingList, sortCrit, whereClause
 
Constructor Summary
MSSQLWhereBuilder(SQLDialect dialect, PropertyNameMapper mapper, OperatorFilter filter, SortProperty[] sortCrit, boolean allowPartialMappings)
          Creates a new MSSQLWhereBuilder instance.
 
Method Summary
protected  SQLOperation toProtoSQL(PropertyIsLike op)
          copied from postgis
protected  SQLOperation toProtoSQL(SpatialOperator op)
          Translates the given SpatialOperator into an SQLOperation.
 
Methods inherited from class org.deegree.sqldialect.filter.AbstractWhereBuilder
assertNotMultiValued, build, getAliasManager, getMappedPropertyNames, getOrderBy, getPostFilter, getPostSortCriteria, getWhere, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSSQLWhereBuilder

public MSSQLWhereBuilder(SQLDialect dialect,
                         PropertyNameMapper mapper,
                         OperatorFilter filter,
                         SortProperty[] sortCrit,
                         boolean allowPartialMappings)
                  throws FilterEvaluationException,
                         UnmappableException
Creates a new MSSQLWhereBuilder instance.

Parameters:
dialect - SQL dialect, can be null (TODO refactor code, so not null is always used)
mapper - provides the mapping from ValueReferences to DB columns, must not be null
filter - filter to use for generating the WHERE clause, can be null
sortCrit - criteria to use for generating the ORDER BY clause, can be null
allowPartialMappings - if false, any unmappable expression will cause an UnmappableException to be thrown
Throws:
FilterEvaluationException - if the expression contains invalid ValueReferences
UnmappableException - if allowPartialMappings is false and an expression could not be mapped to the db
Method Detail

toProtoSQL

protected SQLOperation toProtoSQL(PropertyIsLike op)
                           throws UnmappableException,
                                  FilterEvaluationException
copied from postgis

Overrides:
toProtoSQL in class AbstractWhereBuilder
Parameters:
op - comparison operator to be translated, must not be null
Returns:
corresponding SQL expression, never null
Throws:
UnmappableException - if translation is not possible (usually due to unmappable property names)
FilterEvaluationException - if the expression contains invalid ValueReferences

toProtoSQL

protected SQLOperation toProtoSQL(SpatialOperator op)
                           throws UnmappableException,
                                  FilterEvaluationException
Description copied from class: AbstractWhereBuilder
Translates the given SpatialOperator into an SQLOperation.

Specified by:
toProtoSQL in class AbstractWhereBuilder
Parameters:
op - spatial operator to be translated, must not be null
Returns:
corresponding SQL expression, never null
Throws:
UnmappableException - if translation is not possible (usually due to unmappable property names)
FilterEvaluationException - if the filter contains invalid ValueReferences


Copyright © 2011. All Rights Reserved.