net.sourceforge.openutils.mgnlcriteria.jcr.query
Class AdvancedResult.EmptyResult

java.lang.Object
  extended by net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult.EmptyResult
All Implemented Interfaces:
AdvancedResult
Enclosing interface:
AdvancedResult

public static class AdvancedResult.EmptyResult
extends Object
implements AdvancedResult

Version:
$Id: AdvancedResult.java 2923 2010-08-29 08:58:29Z fgiust $
Author:
fgiust

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult
AdvancedResult.EmptyResult, AdvancedResult.EmptyResultIterator
 
Field Summary
 
Fields inherited from interface net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult
EMPTY_RESULT
 
Constructor Summary
AdvancedResult.EmptyResult()
           
 
Method Summary
 AdvancedResultItem getFirstResult()
          Returns the fist result if available, null otherwise.
 ResultIterator<AdvancedResultItem> getItems()
          Gets an iterator over the results
<K> ResultIterator<K>
getItems(Class<K> theclass)
          Gets an iterator over the results, transforming objects using content2bean while iterating
 int getItemsPerPage()
          Gets the maximum number of results per page
 int getNumberOfPages()
          Gets the total number of pages
 int getPage()
          Gets the page number (1, 2, 3...)
 String getSpellCheckerSuggestion()
          Gets the suggestion from the spell checker.
 int getTotalSize()
          Gets the total number of results that would be retrieved without pagination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedResult.EmptyResult

public AdvancedResult.EmptyResult()
Method Detail

getTotalSize

public int getTotalSize()
Description copied from interface: AdvancedResult
Gets the total number of results that would be retrieved without pagination. Note that jackrabbit may return -1 if the query doesn't have a sort condition, in order to optimize execution. Always add an order by clause (e.g. "order by @jcr:score") if you need to get the total size.

Specified by:
getTotalSize in interface AdvancedResult
Returns:
the total number of results that would be retrieved without pagination.

getSpellCheckerSuggestion

public String getSpellCheckerSuggestion()
Description copied from interface: AdvancedResult
Gets the suggestion from the spell checker. Note that spell checker must be configured in jackrabbit for this to work. See http://wiki.apache.org/jackrabbit/Search for details.

Specified by:
getSpellCheckerSuggestion in interface AdvancedResult
Returns:
the suggestion from the spell checker

getPage

public int getPage()
Description copied from interface: AdvancedResult
Gets the page number (1, 2, 3...)

Specified by:
getPage in interface AdvancedResult
Returns:
the page number (1, 2, 3...)

getItemsPerPage

public int getItemsPerPage()
Description copied from interface: AdvancedResult
Gets the maximum number of results per page

Specified by:
getItemsPerPage in interface AdvancedResult
Returns:
the maximum number of results per page

getItems

public ResultIterator<AdvancedResultItem> getItems()
Description copied from interface: AdvancedResult
Gets an iterator over the results

Specified by:
getItems in interface AdvancedResult
Returns:
an iterator over the results

getNumberOfPages

public int getNumberOfPages()
Description copied from interface: AdvancedResult
Gets the total number of pages

Specified by:
getNumberOfPages in interface AdvancedResult
Returns:
total number of pages

getFirstResult

public AdvancedResultItem getFirstResult()
Description copied from interface: AdvancedResult
Returns the fist result if available, null otherwise.

Specified by:
getFirstResult in interface AdvancedResult
Returns:
the fist result if available, null otherwise.

getItems

public <K> ResultIterator<K> getItems(Class<K> theclass)
Description copied from interface: AdvancedResult
Gets an iterator over the results, transforming objects using content2bean while iterating

Specified by:
getItems in interface AdvancedResult
Type Parameters:
K - destination class.
Parameters:
theclass - destination class.
Returns:
an iterator over the results


Copyright © 2009-2010 Openmind. All Rights Reserved.