com.cgiams.esl.service
Class ValueListSearchContextImpl

java.lang.Object
  extended bycom.cgiams.esl.service.ValueListSearchContextImpl
All Implemented Interfaces:
ValueListSearchContext

public class ValueListSearchContextImpl
extends java.lang.Object
implements ValueListSearchContext

Author:
sbowers

Field Summary
 
Fields inherited from interface com.cgiams.esl.service.ValueListSearchContext
UNDEFINED_MAX_ROWS
 
Constructor Summary
ValueListSearchContextImpl()
          Default constructor.
 
Method Summary
 java.lang.String getListID()
          This method retrieves the unique ID associated with this is list context.
 int getMaxValues()
          Gets the maximum number of values that should be returned for the list.
 java.lang.Object getSearchCriteria()
          The incoming object should provide the necessary details to instruct the ValueListHandler service on where to go and how to query for the value objects.
 boolean moreValues()
          Determines whether the incoming search request is asking for the next set of values associated with this list id.
 void setGetMoreValues(boolean ab_more_values)
          Sets whether the ValueListHandler should retrieve the next set of values for an existing list id.
 void setListID(java.lang.String as_id)
          This method assigns an ID to the eventual list of value objects that will be returned after calling the ValueListHandler.getValueObjects() method.
 void setMaxValues(int ai_max_values)
          Set the maximum number of values that should be returned for the list.
 void setSearchCriteria(java.lang.Object ao_search_criteria)
          The incoming object should provide the necessary details to instruct the ValueListHandler service on where to go and how to query for the value objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueListSearchContextImpl

public ValueListSearchContextImpl()
Default constructor.

Method Detail

setListID

public void setListID(java.lang.String as_id)
This method assigns an ID to the eventual list of value objects that will be returned after calling the ValueListHandler.getValueObjects() method.

Specified by:
setListID in interface ValueListSearchContext
Parameters:
as_id - A unique identifier for the list being returned.

getListID

public java.lang.String getListID()
This method retrieves the unique ID associated with this is list context. This must also correspond to the ID in the ValueListResultContext after the call to the ValueListHandler.getValueObjects() method is made.

Specified by:
getListID in interface ValueListSearchContext
Returns:
The unique identifier for the list being returned.
Throws:
java.lang.IllegalStateException - If the list ID is not specified.

setMaxValues

public void setMaxValues(int ai_max_values)
                  throws java.lang.IllegalArgumentException
Set the maximum number of values that should be returned for the list.

Specified by:
setMaxValues in interface ValueListSearchContext
Parameters:
ai_max_values - The maximum number of rows to return in a list.
Throws:
java.lang.IllegalArgumentException - If a negative number or zero is provided.

getMaxValues

public int getMaxValues()
Gets the maximum number of values that should be returned for the list.

Specified by:
getMaxValues in interface ValueListSearchContext
Returns:
The maximum number of values that should be returned for the list.

setSearchCriteria

public void setSearchCriteria(java.lang.Object ao_search_criteria)
                       throws java.lang.IllegalArgumentException
The incoming object should provide the necessary details to instruct the ValueListHandler service on where to go and how to query for the value objects.

Specified by:
setSearchCriteria in interface ValueListSearchContext
Parameters:
ao_search_criteria - A generic object.
Throws:
java.lang.IllegalArgumentException - If the incoming search criteria is null.

getSearchCriteria

public java.lang.Object getSearchCriteria()
The incoming object should provide the necessary details to instruct the ValueListHandler service on where to go and how to query for the value objects.

Specified by:
getSearchCriteria in interface ValueListSearchContext
Returns:
The generic object of search criteria.
Throws:
java.lang.IllegalStateException - If the incoming search criteria is null.

setGetMoreValues

public void setGetMoreValues(boolean ab_more_values)
Sets whether the ValueListHandler should retrieve the next set of values for an existing list id.

Specified by:
setGetMoreValues in interface ValueListSearchContext
Parameters:
ab_more_values - True if more values should be returned, False if this is the initial request.

moreValues

public boolean moreValues()
Determines whether the incoming search request is asking for the next set of values associated with this list id.

Specified by:
moreValues in interface ValueListSearchContext
Returns:
True if the next set of results should be displayed, otherwise False.