Package com.google.cloud.datastore
Class KeyQuery.Builder
- java.lang.Object
-
- com.google.cloud.datastore.KeyQuery.Builder
-
- All Implemented Interfaces:
StructuredQuery.Builder<Key>
- Enclosing class:
- KeyQuery
public static final class KeyQuery.Builder extends Object
AKeyQuerybuilder for queries that returnKeyresults.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaddOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)Adds settings to the existing order by clause.KeyQuerybuild()BclearOrderBy()Clears any previously specified order by settings.BsetEndCursor(Cursor endCursor)Sets the end cursor for the query.BsetFilter(StructuredQuery.Filter filter)BsetKind(String kind)Sets the kind for the query.BsetLimit(Integer limit)Sets the limit for the query.BsetNamespace(String namespace)Sets the namespace for the query.BsetOffset(int offset)Sets the offset for the query.BsetOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)Sets the query's order by clause (clearing any previously specified order by settings).BsetStartCursor(Cursor startCursor)Sets the start cursor for the query.
-
-
-
Method Detail
-
build
public KeyQuery build()
-
setNamespace
public B setNamespace(String namespace)
Description copied from interface:StructuredQuery.BuilderSets the namespace for the query.- Specified by:
setNamespacein interfaceStructuredQuery.Builder<V>
-
setKind
public B setKind(String kind)
Description copied from interface:StructuredQuery.BuilderSets the kind for the query.- Specified by:
setKindin interfaceStructuredQuery.Builder<V>
-
setStartCursor
public B setStartCursor(Cursor startCursor)
Description copied from interface:StructuredQuery.BuilderSets the start cursor for the query.- Specified by:
setStartCursorin interfaceStructuredQuery.Builder<V>
-
setEndCursor
public B setEndCursor(Cursor endCursor)
Description copied from interface:StructuredQuery.BuilderSets the end cursor for the query.- Specified by:
setEndCursorin interfaceStructuredQuery.Builder<V>
-
setOffset
public B setOffset(int offset)
Description copied from interface:StructuredQuery.BuilderSets the offset for the query.- Specified by:
setOffsetin interfaceStructuredQuery.Builder<V>
-
setLimit
public B setLimit(Integer limit)
Description copied from interface:StructuredQuery.BuilderSets the limit for the query.- Specified by:
setLimitin interfaceStructuredQuery.Builder<V>
-
setFilter
public B setFilter(StructuredQuery.Filter filter)
- Specified by:
setFilterin interfaceStructuredQuery.Builder<V>
-
clearOrderBy
public B clearOrderBy()
Description copied from interface:StructuredQuery.BuilderClears any previously specified order by settings.- Specified by:
clearOrderByin interfaceStructuredQuery.Builder<V>
-
setOrderBy
public B setOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Description copied from interface:StructuredQuery.BuilderSets the query's order by clause (clearing any previously specified order by settings).- Specified by:
setOrderByin interfaceStructuredQuery.Builder<V>
-
addOrderBy
public B addOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Description copied from interface:StructuredQuery.BuilderAdds settings to the existing order by clause.- Specified by:
addOrderByin interfaceStructuredQuery.Builder<V>
-
-