net.sf.eos.search
Interface EosQuery

All Superinterfaces:
Configurable
All Known Implementing Classes:
DefaultEosQuery

public interface EosQuery
extends Configurable

A query is always constructed by the EosLookup instance and supports simple lookups in an entity oriented search index.

The query is very simple. At this time an entity oriented search system doesn't need sophisticated queries.

Author:
Sascha Kohlmann

Method Summary
 EosQuery and(String phrase)
          Adds a phrase to lookup with the boolean and operation.
 EosQuery andMeta(String fieldName, String value)
          Adds a meta entry for a special field to lookup with the boolean and operation.
 EosQuery andMetaRange(String fieldName, String lowerBoundValue, String upperBoundValue)
          Adds a meta entry for a special field to lookup with the boolean and operation.
 EosQuery andNot(String phrase)
          Adds a phrase not to lookup with the boolean and operation.
 EosQuery andNotMeta(String fieldName, String value)
          Adds a meta entry for a special field to not lookup with the boolean and operation.
 List<LookupEntry> execute()
          Creates the executable query.
 EosQuery or(String phrase)
          Adds a phrase to lookup with the boolean or operation.
 EosQuery orMeta(String fieldName, String value)
          Adds a meta entry for a special field to lookup with the boolean or operation.
 EosQuery orMetaRange(String fieldName, String lowerBoundValue, String upperBoundValue)
          Adds a meta entry for a special field to lookup with the boolean or operation.
 
Methods inherited from interface net.sf.eos.config.Configurable
configure
 

Method Detail

and

EosQuery and(String phrase)
             throws EosException
Adds a phrase to lookup with the boolean and operation.

Parameters:
phrase - the phrase to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

or

EosQuery or(String phrase)
            throws EosException
Adds a phrase to lookup with the boolean or operation.

Parameters:
phrase - the phrase to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

andNot

EosQuery andNot(String phrase)
                throws EosException
Adds a phrase not to lookup with the boolean and operation.

Parameters:
phrase - the phrase to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

andMeta

EosQuery andMeta(String fieldName,
                 String value)
                 throws EosException
Adds a meta entry for a special field to lookup with the boolean and operation.

Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

andNotMeta

EosQuery andNotMeta(String fieldName,
                    String value)
                    throws EosException
Adds a meta entry for a special field to not lookup with the boolean and operation.

Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

orMeta

EosQuery orMeta(String fieldName,
                String value)
                throws EosException
Adds a meta entry for a special field to lookup with the boolean or operation.

Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

andMetaRange

EosQuery andMetaRange(String fieldName,
                      String lowerBoundValue,
                      String upperBoundValue)
                      throws EosException
Adds a meta entry for a special field to lookup with the boolean and operation. The two value parameters spans a range between the lower bound value and the upper bound value.

Parameters:
fieldName - the meta field name to lookup
lowerBoundValue - the meta lower bound value to lookup
upperBoundValue - the meta upper bound value to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

orMetaRange

EosQuery orMetaRange(String fieldName,
                     String lowerBoundValue,
                     String upperBoundValue)
                     throws EosException
Adds a meta entry for a special field to lookup with the boolean or operation. The two value parameters spans a range between the lower bound value and the upper bound value.

Parameters:
fieldName - the meta field name to lookup
lowerBoundValue - the meta lower bound value to lookup
upperBoundValue - the meta upper bound value to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

execute

List<LookupEntry> execute()
                          throws EosException
Creates the executable query.

Returns:
the executable query
Throws:
EosException - if an error occurs


Copyright © 2008. All Rights Reserved.