org.compass.core.impl
Class DefaultCompassQueryFilterBuilder

java.lang.Object
  extended by org.compass.core.impl.DefaultCompassQueryFilterBuilder
All Implemented Interfaces:
CompassQueryFilterBuilder

public class DefaultCompassQueryFilterBuilder
extends Object
implements CompassQueryFilterBuilder

Author:
kimchy

Nested Class Summary
static class DefaultCompassQueryFilterBuilder.DefaultCompassBooleanQueryFilterBuilder
           
 
Nested classes/interfaces inherited from interface org.compass.core.CompassQueryFilterBuilder
CompassQueryFilterBuilder.CompassBooleanQueryFilterBuilder, CompassQueryFilterBuilder.ToCompassQueryFilter
 
Constructor Summary
DefaultCompassQueryFilterBuilder(SearchEngineQueryFilterBuilder filterBuilder, InternalCompassSession session)
           
 
Method Summary
 CompassQueryFilter between(String name, Object low, Object high, boolean includeLow, boolean includeHigh)
          Creates a query filter where the resource proeprty is between the given values.
 CompassQueryFilterBuilder.CompassBooleanQueryFilterBuilder bool()
          Creates a boolean query filter builder.
 CompassQueryFilterBuilder convertOnlyWithDotPath(boolean convertOnlyWithDotPath)
          Should Compass use a converter for value passed even if there is no specific direct dot path notation to it.
 CompassQueryFilter ge(String name, Object value)
          Creates a query filter where the resource proeprty is greater or equal (>=) to the given value.
 CompassQueryFilter gt(String name, Object value)
          Creates a query filter where the resource proeprty is greater than (>) to the given value.
 CompassQueryFilter le(String name, Object value)
          Creates a query filter where the resource proeprty is less or equal (<=) to the given value.
 CompassQueryFilter lt(String name, Object value)
          Creates a query filter where the resource proeprty is less than (<) the given value.
 CompassQueryFilter query(CompassQuery query)
          Creates a query filter that is based on the given compass query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompassQueryFilterBuilder

public DefaultCompassQueryFilterBuilder(SearchEngineQueryFilterBuilder filterBuilder,
                                        InternalCompassSession session)
Method Detail

convertOnlyWithDotPath

public CompassQueryFilterBuilder convertOnlyWithDotPath(boolean convertOnlyWithDotPath)
Description copied from interface: CompassQueryFilterBuilder
Should Compass use a converter for value passed even if there is no specific direct dot path notation to it. It will try and derive the best converter to use. Defaults to false.

Specified by:
convertOnlyWithDotPath in interface CompassQueryFilterBuilder
See Also:
ResourcePropertyLookup.setConvertOnlyWithDotPath(boolean)

between

public CompassQueryFilter between(String name,
                                  Object low,
                                  Object high,
                                  boolean includeLow,
                                  boolean includeHigh)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter where the resource proeprty is between the given values.

The name can either be the actual resource property or meta-data value, or the path to the given resource property (alias.rProperty), or the class property (alias.cProperty) or the path to the meta-data (alias.cProperty.metaData)

Specified by:
between in interface CompassQueryFilterBuilder
Parameters:
name - The resource property name
low - The low value limit
high - The high value limit
includeLow - Include the lower value
includeHigh - Include the high value
Returns:
The query filter

lt

public CompassQueryFilter lt(String name,
                             Object value)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter where the resource proeprty is less than (<) the given value.

The name can either be the actual resource property or meta-data value, or the path to the given resource property (alias.rProperty), or the class property (alias.cProperty) or the path to the meta-data (alias.cProperty.metaData)

Specified by:
lt in interface CompassQueryFilterBuilder
Parameters:
name - The resource property name
value - The high limit value
Returns:
The generated query filter

le

public CompassQueryFilter le(String name,
                             Object value)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter where the resource proeprty is less or equal (<=) to the given value.

The name can either be the actual resource property or meta-data value, or the path to the given resource property (alias.rProperty), or the class property (alias.cProperty) or the path to the meta-data (alias.cProperty.metaData)

Specified by:
le in interface CompassQueryFilterBuilder
Parameters:
name - The resource property name
value - The high limit value
Returns:
The generated query filter

gt

public CompassQueryFilter gt(String name,
                             Object value)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter where the resource proeprty is greater than (>) to the given value.

The name can either be the actual resource property or meta-data value, or the path to the given resource property (alias.rProperty), or the class property (alias.cProperty) or the path to the meta-data (alias.cProperty.metaData)

Specified by:
gt in interface CompassQueryFilterBuilder
Parameters:
name - The resource property name
value - The low limit value
Returns:
The generated query filter

ge

public CompassQueryFilter ge(String name,
                             Object value)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter where the resource proeprty is greater or equal (>=) to the given value.

The name can either be the actual resource property or meta-data value, or the path to the given resource property (alias.rProperty), or the class property (alias.cProperty) or the path to the meta-data (alias.cProperty.metaData)

Specified by:
ge in interface CompassQueryFilterBuilder
Parameters:
name - The resource property name
value - The low limit value
Returns:
The generated query filter

query

public CompassQueryFilter query(CompassQuery query)
Description copied from interface: CompassQueryFilterBuilder
Creates a query filter that is based on the given compass query.

Specified by:
query in interface CompassQueryFilterBuilder
Parameters:
query - The query to filter by.
Returns:
The query filter.

bool

public CompassQueryFilterBuilder.CompassBooleanQueryFilterBuilder bool()
Description copied from interface: CompassQueryFilterBuilder
Creates a boolean query filter builder.

Specified by:
bool in interface CompassQueryFilterBuilder
Returns:
The boolean query filter builder


Copyright (c) 2004-2008 The Compass Project.