org.apache.slide.search.basic
Interface IBasicQuery

All Known Implementing Classes:
BasicQuery, BasicQueryEnvelope, BasicQueryImpl

public interface IBasicQuery

A BasicQuery represents the query and is able to deliver a SearchQueryResult using the execute method. It serves as a base class for store specific implementations. It hosts the information about the SELECT, FROM, WHERE, ORDERBY and LIMIT. It also holds a tree of BasicSearchExpressions.

Version:
$Revision: 1.7 $

Method Summary
 SearchQueryResult execute()
          Executes a request.
 IBasicExpressionFactory getContentExpressionFactory()
          Method getContentExpressionFactory
 IBasicExpression getExpression()
          Method getExpression
 int getLimit()
          Method getLimit
 IBasicExpressionFactory getPropertiesExpressionFactory()
          Method getPropertiesExpressionFactory
 PropertyProvider getPropertyProvider()
          Method getPropertyProvider
 QueryScope getScope()
          QueryScope accessor
 SearchToken getSearchToken()
          Method getSearchToken
 java.lang.String getSlidePath()
          Method getSlidePath
 AbstractStore getStore()
          Method getStore
 void init(SearchToken token)
          Method init
 boolean isLimitDefined()
          Method isLimitDefined
 void parseQueryElement(org.jdom.Element basicSearchElement, PropertyProvider propertyProvider)
          Builds the internal structure from the JDOM tree.
 RequestedProperties requestedProperties()
          Method getSelectedProperties
 

Method Detail

getStore

public AbstractStore getStore()
Method getStore

Returns:
an AbstractStore

getSlidePath

public java.lang.String getSlidePath()
                              throws InvalidScopeException
Method getSlidePath

Returns:
a String
Throws:
InvalidScopeException

getSearchToken

public SearchToken getSearchToken()
Method getSearchToken

Returns:
a SearchToken

parseQueryElement

public void parseQueryElement(org.jdom.Element basicSearchElement,
                              PropertyProvider propertyProvider)
                       throws BadQueryException
Builds the internal structure from the JDOM tree. Concrete implementations may use parseQueryElementWithoutExpression to create most of the objects describing the query.

Parameters:
basicSearchElement - the (root) expression Element.
propertyProvider - the PropertyProvider to use (may be null).
Throws:
BadQueryException

execute

public SearchQueryResult execute()
                          throws ServiceAccessException
Executes a request. A store specific implementation should overwrite this to optimize the execution.

Returns:
a SearchQueryResult
Throws:
ServiceAccessException

getScope

public QueryScope getScope()
QueryScope accessor

Returns:
the Scope

requestedProperties

public RequestedProperties requestedProperties()
Method getSelectedProperties

Returns:
a SelectedPropertyList

getExpression

public IBasicExpression getExpression()
Method getExpression

Returns:
a BasicExpression

isLimitDefined

public boolean isLimitDefined()
Method isLimitDefined

Returns:
true if was specified

getLimit

public int getLimit()
Method getLimit

Returns:
the value of

getPropertyProvider

public PropertyProvider getPropertyProvider()
Method getPropertyProvider

Returns:
a PropertyProvider

init

public void init(SearchToken token)
Method init

Parameters:
token - a SearchToken

getContentExpressionFactory

public IBasicExpressionFactory getContentExpressionFactory()
Method getContentExpressionFactory

Returns:
the content store / indexer specific ExpressionFactory

getPropertiesExpressionFactory

public IBasicExpressionFactory getPropertiesExpressionFactory()
Method getPropertiesExpressionFactory

Returns:
the properties store / indexer specific ExpressionFactory