com.trg.search.flex
Class FlexSearchWrapper

java.lang.Object
  extended by com.trg.search.flex.FlexSearchWrapper
All Implemented Interfaces:
ISearch

public class FlexSearchWrapper
extends java.lang.Object
implements ISearch

This provides a wrapper around a FlexSearch so that is can be passed into DAO methods requiring the ISearch interface.

Author:
dwolverton

Field Summary
 
Fields inherited from interface com.trg.search.ISearch
RESULT_ARRAY, RESULT_AUTO, RESULT_LIST, RESULT_MAP, RESULT_SINGLE
 
Constructor Summary
FlexSearchWrapper(FlexSearch flexSearch)
           
 
Method Summary
 java.util.List<java.lang.String> getFetches()
           
 java.util.List<Field> getFields()
           
 java.util.List<Filter> getFilters()
           
 int getFirstResult()
          Zero based index of first result record to return.
 int getMaxResults()
          The maximum number of records to return.
 int getPage()
          Zero based index of the page of records to return.
 int getResultMode()
          Result mode tells the search what form to use for the results.
 java.lang.Class<?> getSearchClass()
           
 java.util.List<Sort> getSorts()
           
 boolean isDisjunction()
           
 boolean isDistinct()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlexSearchWrapper

public FlexSearchWrapper(FlexSearch flexSearch)
Method Detail

getFetches

public java.util.List<java.lang.String> getFetches()
Specified by:
getFetches in interface ISearch

getFields

public java.util.List<Field> getFields()
Specified by:
getFields in interface ISearch

getFilters

public java.util.List<Filter> getFilters()
Specified by:
getFilters in interface ISearch

getFirstResult

public int getFirstResult()
Description copied from interface: ISearch
Zero based index of first result record to return.

<= 0 for unspecified value.

Specified by:
getFirstResult in interface ISearch

getMaxResults

public int getMaxResults()
Description copied from interface: ISearch
The maximum number of records to return. Also used as page size when calculating the first record to return based on page.

<= 0 for unspecified value.

Specified by:
getMaxResults in interface ISearch

getPage

public int getPage()
Description copied from interface: ISearch
Zero based index of the page of records to return. The size of a page is determined by maxResults. If both page and maxResults are specified (i.e. > 0), the first result returned is calculated by page * maxResults.

firstResult has precedence over page. So if firstResult is specified (i.e. > 0), page is ignored.

<= 0 for unspecified value.

Specified by:
getPage in interface ISearch

getResultMode

public int getResultMode()
Description copied from interface: ISearch
Result mode tells the search what form to use for the results. Options include RESULT_AUTO, RESULT_ARRAY, RESULT_LIST , RESULT_MAP and RESULT_SINGLE .

Specified by:
getResultMode in interface ISearch
See Also:
ISearch.RESULT_AUTO, ISearch.RESULT_ARRAY, ISearch.RESULT_LIST, ISearch.RESULT_MAP, ISearch.RESULT_SINGLE

getSearchClass

public java.lang.Class<?> getSearchClass()
Specified by:
getSearchClass in interface ISearch

getSorts

public java.util.List<Sort> getSorts()
Specified by:
getSorts in interface ISearch

isDisjunction

public boolean isDisjunction()
Specified by:
isDisjunction in interface ISearch

isDistinct

public boolean isDistinct()
Specified by:
isDistinct in interface ISearch


Copyright © 2008-2010 eBM WebSourcing. All Rights Reserved.