com.google.appengine.api.search.checkers
Class ListDocumentsRequestChecker

java.lang.Object
  extended by com.google.appengine.api.search.checkers.ListDocumentsRequestChecker

public class ListDocumentsRequestChecker
extends java.lang.Object

Checks values of ListDocumentsParams.


Field Summary
static int DEFAULT_LIMIT
          The default number of documents requested.
static int MAXIMUM_LIMIT
          The maximum number of documents which can be requested.
 
Constructor Summary
ListDocumentsRequestChecker()
           
 
Method Summary
static int checkLimit(int limit)
          Checks whether the number of documents to return is between 1 and the maximum.
static ListDocumentsParams checkListDocumentsParams(ListDocumentsParams params)
          Checks the values of the ListDocumentsParams params.
static java.lang.String checkStartDocId(java.lang.String startDocId)
          Checks whether the given start document Is legal.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_LIMIT

public static final int MAXIMUM_LIMIT
The maximum number of documents which can be requested.

See Also:
Constant Field Values

DEFAULT_LIMIT

public static final int DEFAULT_LIMIT
The default number of documents requested.

See Also:
Constant Field Values
Constructor Detail

ListDocumentsRequestChecker

public ListDocumentsRequestChecker()
Method Detail

checkLimit

public static int checkLimit(int limit)
Checks whether the number of documents to return is between 1 and the maximum.

Parameters:
limit - the maximum number of documents to return in results list
Returns:
the checked number of documents to return
Throws:
java.lang.IllegalArgumentException - if the number of documents to return is out of range

checkStartDocId

public static java.lang.String checkStartDocId(java.lang.String startDocId)
Checks whether the given start document Is legal.

Parameters:
startDocId - the start ocument Id to be checked.
Returns:
the checked start document Id.
Throws:
java.lang.IllegalArgumentException - if the start document Id is illegal.

checkListDocumentsParams

public static ListDocumentsParams checkListDocumentsParams(ListDocumentsParams params)
Checks the values of the ListDocumentsParams params.

Parameters:
params - The ListDocumentsParams to check
Returns:
the checked params
Throws:
java.lang.IllegalArgumentException - if some of the values of params are invalid