org.ow2.petals.flowwatch.flowmanager
Class RequestOptions

java.lang.Object
  extended by org.ow2.petals.flowwatch.flowmanager.RequestOptions

public class RequestOptions
extends java.lang.Object

Defines options for requesting Flowwatch database.

This allows defining "sort", "pagination" and "case sensitive" and "filter" options when requesting the Flowwatch database

Author:
ofabre - eBM Websourcing

Constructor Summary
RequestOptions()
           
 
Method Summary
 void addFilter(Filter filter)
           
 java.util.List<Filter> getFilters()
           
 int getFirstResult()
          Returns the requested first result index.
 int getNbOfResults()
          Returns the requested number of results.
 int getSortCriteria()
          Returns the sort criteria ID
 boolean hasFilterOption()
          Determines whether filter options are set
 boolean hasPagination()
          Determines whether pagination options are set
 boolean hasSortOption()
          Determines whether sort options are set
 boolean isSortAscendingly()
          Determines whether sort is ascending.
 void setFilters(java.util.List<Filter> filters)
           
 void setFirstResult(int firstResult)
          Sets the requested first result index.
 void setNbOfResults(int nbOfResults)
          Sets the requested number of results.
 void setSortAscendingly(boolean sortAscendingly)
          Sets whether sort is ascending.
 void setSortCriteria(int sortColumn)
          Sets the sort criteria ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestOptions

public RequestOptions()
Method Detail

getFirstResult

public int getFirstResult()
Returns the requested first result index.

This the pagination offset

Returns:

getNbOfResults

public int getNbOfResults()
Returns the requested number of results.

This the pagination length

Returns:

getSortCriteria

public int getSortCriteria()
Returns the sort criteria ID

Returns:

hasPagination

public boolean hasPagination()
Determines whether pagination options are set

Returns:

hasSortOption

public boolean hasSortOption()
Determines whether sort options are set

Returns:

hasFilterOption

public boolean hasFilterOption()
Determines whether filter options are set

Returns:

isSortAscendingly

public boolean isSortAscendingly()
Determines whether sort is ascending.

Returns:

setFirstResult

public void setFirstResult(int firstResult)
Sets the requested first result index.

Parameters:
firstResult -

setNbOfResults

public void setNbOfResults(int nbOfResults)
Sets the requested number of results.

Parameters:
nbOfResults -

setSortAscendingly

public void setSortAscendingly(boolean sortAscendingly)
Sets whether sort is ascending.

Parameters:
sortAscendingly -

setSortCriteria

public void setSortCriteria(int sortColumn)
Sets the sort criteria ID

Parameters:
sortColumn -

getFilters

public java.util.List<Filter> getFilters()

setFilters

public void setFilters(java.util.List<Filter> filters)

addFilter

public void addFilter(Filter filter)


Copyright © 2009-2010 eBM Websourcing. All Rights Reserved.