Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.slide.search.basic.expression
Class CompareExpression

    java.lang.Object
      org.apache.slide.search.basic.expression.BasicExpression
          org.apache.slide.search.basic.expression.GenericBasicExpression
              org.apache.slide.search.basic.expression.CompareExpression

All Implemented Interfaces:
  IBasicExpression

Direct Known Subclasses:
  ComparePropertyExpression, ContainsExpression

public abstract class CompareExpression
extends GenericBasicExpression

Abstract base class for compare expressions (property compares, contains).

Version:
  $Revision: 1.4 $

Field Summary
`protected PropertyProvider` | `propertyProvider` The PropertyProvider to use (may be `null`).
`protected ComparableResourcesPool` | `requestedResourcesPool` The pool of resources to apply the expression to.

Fields inherited from class org.apache.slide.search.basic.expression.BasicExpression
`expressionElement, expressionFactory, resultSet`

Constructor Summary
`(package private)` | `CompareExpression(org.jdom.Element e, ComparableResourcesPool requestedResourcesPool)` Creates a compare expression according to Element e

Method Summary
`protected abstract boolean` | `compare(ComparableResource item)` The concrete CompareExpression must overwrite this.
`IBasicResultSet` | `execute()` Executes the expression.
`ComparableResourcesPool` | `getRequestedResourcePool()` Returns the RequestedResourcesPool to use.

Methods inherited from class org.apache.slide.search.basic.expression.BasicExpression
`getFactory, setFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### requestedResourcesPool

    protected ComparableResourcesPool requestedResourcesPool

  The pool of resources to apply the expression to.

### propertyProvider

    protected PropertyProvider propertyProvider

  The PropertyProvider to use (may be `null`).

Constructor Detail

### CompareExpression

    CompareExpression(org.jdom.Element e,
                      ComparableResourcesPool requestedResourcesPool)
                throws InvalidQueryException

  Creates a compare expression according to Element e

Parameters:
  `e` - jdom element, that describes the expression
  `requestedResourcesPool` - the pool of resources to apply the expression to.

Method Detail

### execute

    public IBasicResultSet execute()
                            throws SearchException

  Executes the expression.

  Returns:
    a Set of RequestedResource objects
  Throws:
    `SearchException`

### getRequestedResourcePool

    public ComparableResourcesPool getRequestedResourcePool()

  Returns the RequestedResourcesPool to use.

  Returns:
    the RequestedResourcesPool to use.

### compare

    protected abstract boolean compare(ComparableResource item)

  The concrete CompareExpression must overwrite this.

  Parameters:
    `item` - one BasicDataItem out of pool
  Returns:
    a boolean

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD