net.sourceforge.openutils.mgnlcriteria.jcr.query
Class DirectJcrQuery

java.lang.Object
  extended by net.sourceforge.openutils.mgnlcriteria.jcr.query.DirectJcrQuery
All Implemented Interfaces:
ExecutableQuery

public class DirectJcrQuery
extends Object
implements ExecutableQuery

Version:
$Id: DirectJcrQuery.java 2923 2010-08-29 08:58:29Z fgiust $
Author:
fgiust
See Also:
JCRCriteriaFactory.createDirectJcrQuery(info.magnolia.cms.core.HierarchyManager, String, String)

Constructor Summary
DirectJcrQuery(info.magnolia.cms.core.HierarchyManager hm, String query, String language)
           
 
Method Summary
 AdvancedResult execute()
          Executes the query
 DirectJcrQuery setMaxResultsPerPage(int maxResults)
          Sets the maxResults.
 DirectJcrQuery setOffset(int offset)
          Sets the offset.
 DirectJcrQuery setPaging(int itemsPerPage, int pageNumberStartingFromOne)
          Utility method for setting offset easier.
 DirectJcrQuery setSpellCheckString(String spellCheckString)
          Sets the spellCheckString.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectJcrQuery

public DirectJcrQuery(info.magnolia.cms.core.HierarchyManager hm,
                      String query,
                      String language)
Parameters:
hm -
query -
language -
Method Detail

setSpellCheckString

public DirectJcrQuery setSpellCheckString(String spellCheckString)
Sets the spellCheckString.

Parameters:
spellCheckString - the spellCheckString to set
Returns:
the DirectJcrQuery instance for chaining

setMaxResultsPerPage

public DirectJcrQuery setMaxResultsPerPage(int maxResults)
Sets the maxResults.

Parameters:
maxResults - the maxResults to set
Returns:
the DirectJcrQuery instance for chaining

setOffset

public DirectJcrQuery setOffset(int offset)
Sets the offset.

Parameters:
offset - the offset to set
Returns:
the DirectJcrQuery instance for chaining

setPaging

public DirectJcrQuery setPaging(int itemsPerPage,
                                int pageNumberStartingFromOne)
Utility method for setting offset easier. If this method is called you should not use setOffset/setMaxResults directly anymore.

Parameters:
itemsPerPage - number of items per page
pageNumberStartingFromOne - page number (starting from 1)
Returns:
the DirectJcrQuery instance for chaining

execute

public AdvancedResult execute()
Executes the query

Specified by:
execute in interface ExecutableQuery
Returns:
the search result


Copyright © 2009-2010 Openmind. All Rights Reserved.