Package com.google.appengine.api.search
Class GetIndexesRequest.Builder
- java.lang.Object
-
- com.google.appengine.api.search.GetIndexesRequest.Builder
-
- Enclosing class:
- GetIndexesRequest
public static final class GetIndexesRequest.Builder extends Object
The builder ofGetIndexesRequests.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetIndexesRequestbuild()GetIndexesRequest.BuildersetAllNamespaces(boolean allNamespaces)Sets whether or not to fetch indexes from all namespaces.GetIndexesRequest.BuildersetIncludeStartIndex(boolean includeStartIndex)Sets whether or not to include the index whose name is specified via thesetStartIndexName(String)method.GetIndexesRequest.BuildersetIndexNamePrefix(String indexNamePrefix)Sets the prefix to be matched against the names of returned indexes.GetIndexesRequest.BuildersetLimit(Integer limit)Sets the maximum number of indexes to return.GetIndexesRequest.BuildersetNamespace(String namespace)Sets the namespace to use for this request.GetIndexesRequest.BuildersetOffset(Integer offset)Sets the offset of the first index to return.GetIndexesRequest.BuildersetSchemaFetched(boolean schemaFetched)Sets whether or not the schema is returned with indexes.GetIndexesRequest.BuildersetStartIndexName(String startIndexName)Sets the name of the first index to return.
-
-
-
Method Detail
-
setOffset
public GetIndexesRequest.Builder setOffset(Integer offset)
Sets the offset of the first index to return. This method comes with a performance penalty and if you just want to page through all indexes you should considersetStartIndexName(String)method.- Parameters:
offset- the offset of the first returned index- Returns:
- this builder
- Throws:
IllegalArgumentException- if negative or too large offset is given
-
setIndexNamePrefix
public GetIndexesRequest.Builder setIndexNamePrefix(String indexNamePrefix)
Sets the prefix to be matched against the names of returned indexes. If the prefix is set to, say "a", only indexes with names starting with 'a' will be returned.- Parameters:
indexNamePrefix- the prefix used to select returned indexes- Returns:
- this builder
- Throws:
IllegalArgumentException- if invalid index name is given
-
setIncludeStartIndex
public GetIndexesRequest.Builder setIncludeStartIndex(boolean includeStartIndex)
Sets whether or not to include the index whose name is specified via thesetStartIndexName(String)method.- Parameters:
includeStartIndex- whether or not to return the start index- Returns:
- this builder
-
setStartIndexName
public GetIndexesRequest.Builder setStartIndexName(String startIndexName)
Sets the name of the first index to return. You may exclude this index by using thesetIncludeStartIndex(boolean)method.- Parameters:
startIndexName- the name of the first index to be returned- Returns:
- this builder
- Throws:
IllegalArgumentException- if invalid start index name is given
-
setLimit
public GetIndexesRequest.Builder setLimit(Integer limit)
Sets the maximum number of indexes to return.- Parameters:
limit- the number of indexes to return- Returns:
- this builder
- Throws:
IllegalArgumentException- if negative or too large limit is given
-
setSchemaFetched
public GetIndexesRequest.Builder setSchemaFetched(boolean schemaFetched)
Sets whether or not the schema is returned with indexes. An index schema is a map from field names to field types.- Parameters:
schemaFetched- whether or not schemas are present in returned indexes- Returns:
- this builder
-
setNamespace
public GetIndexesRequest.Builder setNamespace(String namespace)
Sets the namespace to use for this request. Only indexes defined within this namespace will be fetched.- Parameters:
namespace- The namespace for this request.- Returns:
- this builder
-
setAllNamespaces
public GetIndexesRequest.Builder setAllNamespaces(boolean allNamespaces)
Sets whether or not to fetch indexes from all namespaces.- Parameters:
allNamespaces- whether or not to fetch indexes from all namespaces- Returns:
- this builder
-
build
public GetIndexesRequest build()
- Returns:
- builds and returns a brand new instance of
a
GetIndexesRequestusing values set on this builder
-
-