Class GetRequestChecker
- java.lang.Object
-
- com.google.appengine.api.search.checkers.GetRequestChecker
-
public class GetRequestChecker extends Object
Checks values ofGetRequest.
-
-
Constructor Summary
Constructors Constructor Description GetRequestChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcheckLimit(int limit)Checks whether the number of documents to return is between 0 and the maximum.static com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParamscheckListDocumentsParams(com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParams params)Checks the values of theSearchServicePb.ListDocumentsParamsparams.static StringcheckStartDocId(String startDocId)Checks whether the given start document Is legal.
-
-
-
Method Detail
-
checkLimit
public static int checkLimit(int limit)
Checks whether the number of documents to return is between 0 and the maximum.- Parameters:
limit- the maximum number of documents to return in results list- Returns:
- the checked number of documents to return
- Throws:
IllegalArgumentException- if the number of documents to return is out of range
-
checkStartDocId
public static String checkStartDocId(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:
IllegalArgumentException- if the start document Id is illegal.
-
checkListDocumentsParams
public static com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParams checkListDocumentsParams(com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParams params)
Checks the values of theSearchServicePb.ListDocumentsParamsparams.- Parameters:
params- TheSearchServicePb.ListDocumentsParamsto check- Returns:
- the checked params
- Throws:
IllegalArgumentException- if some of the values of params are invalid
-
-