ehcache

net.sf.ehcache.search.expression
Class Between

java.lang.Object
  extended by net.sf.ehcache.search.expression.BaseCriteria
      extended by net.sf.ehcache.search.expression.ComparableValue
          extended by net.sf.ehcache.search.expression.Between
All Implemented Interfaces:
Criteria

public class Between
extends ComparableValue

Range criteria

Author:
teck

Constructor Summary
Between(String attributeName, Object min, Object max, boolean minInclusive, boolean maxInclusive)
          Constructor
 
Method Summary
protected  boolean executeComparable(Comparable attributeValue)
          Execute this criteria for the given Comparable attribute value
protected  boolean executeComparableString(Comparable attributeValue)
          Execute this criteria for the given Comparable strin type attribute value
 Comparable getMax()
          Get the maximum value
 Comparable getMin()
          Get the minimum value
 boolean isMaxInclusive()
           
 boolean isMinInclusive()
           
 
Methods inherited from class net.sf.ehcache.search.expression.ComparableValue
execute, getAttributeName, getAttributes, getType, luceneStringCompare
 
Methods inherited from class net.sf.ehcache.search.expression.BaseCriteria
and, getExtractor, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Between

public Between(String attributeName,
               Object min,
               Object max,
               boolean minInclusive,
               boolean maxInclusive)
Constructor

Parameters:
attributeName - attribute name
min - minimum value of range
max - maximum value of range
minInclusive - is minimum inclusive?
maxInclusive - is maximum inclusive?
Method Detail

getMin

public Comparable getMin()
Get the minimum value

Returns:
min value

getMax

public Comparable getMax()
Get the maximum value

Returns:
max value

isMinInclusive

public boolean isMinInclusive()
Returns:
true if the min is included in range

isMaxInclusive

public boolean isMaxInclusive()
Returns:
true if the max is included in range

executeComparable

protected boolean executeComparable(Comparable attributeValue)
Execute this criteria for the given Comparable attribute value

Specified by:
executeComparable in class ComparableValue
Parameters:
attributeValue - Comparable attribute value
Returns:
true if criteria is met

executeComparableString

protected boolean executeComparableString(Comparable attributeValue)
Execute this criteria for the given Comparable strin type attribute value

Specified by:
executeComparableString in class ComparableValue
Parameters:
attributeValue - Comparable attribute value
Returns:
true if criteria is met

ehcache

Copyright 2001-2015, Terracotta, Inc.