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
AKeyQuery
builder for queries that returnKey
results.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
addOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Adds settings to the existing order by clause.KeyQuery
build()
B
clearOrderBy()
Clears any previously specified order by settings.B
setEndCursor(Cursor endCursor)
Sets the end cursor for the query.B
setFilter(StructuredQuery.Filter filter)
B
setKind(String kind)
Sets the kind for the query.B
setLimit(Integer limit)
Sets the limit for the query.B
setNamespace(String namespace)
Sets the namespace for the query.B
setOffset(int offset)
Sets the offset for the query.B
setOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Sets the query's order by clause (clearing any previously specified order by settings).B
setStartCursor(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.Builder
Sets the namespace for the query.- Specified by:
setNamespace
in interfaceStructuredQuery.Builder<V>
-
setKind
public B setKind(String kind)
Description copied from interface:StructuredQuery.Builder
Sets the kind for the query.- Specified by:
setKind
in interfaceStructuredQuery.Builder<V>
-
setStartCursor
public B setStartCursor(Cursor startCursor)
Description copied from interface:StructuredQuery.Builder
Sets the start cursor for the query.- Specified by:
setStartCursor
in interfaceStructuredQuery.Builder<V>
-
setEndCursor
public B setEndCursor(Cursor endCursor)
Description copied from interface:StructuredQuery.Builder
Sets the end cursor for the query.- Specified by:
setEndCursor
in interfaceStructuredQuery.Builder<V>
-
setOffset
public B setOffset(int offset)
Description copied from interface:StructuredQuery.Builder
Sets the offset for the query.- Specified by:
setOffset
in interfaceStructuredQuery.Builder<V>
-
setLimit
public B setLimit(Integer limit)
Description copied from interface:StructuredQuery.Builder
Sets the limit for the query.- Specified by:
setLimit
in interfaceStructuredQuery.Builder<V>
-
setFilter
public B setFilter(StructuredQuery.Filter filter)
- Specified by:
setFilter
in interfaceStructuredQuery.Builder<V>
-
clearOrderBy
public B clearOrderBy()
Description copied from interface:StructuredQuery.Builder
Clears any previously specified order by settings.- Specified by:
clearOrderBy
in interfaceStructuredQuery.Builder<V>
-
setOrderBy
public B setOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Description copied from interface:StructuredQuery.Builder
Sets the query's order by clause (clearing any previously specified order by settings).- Specified by:
setOrderBy
in interfaceStructuredQuery.Builder<V>
-
addOrderBy
public B addOrderBy(StructuredQuery.OrderBy orderBy, StructuredQuery.OrderBy... others)
Description copied from interface:StructuredQuery.Builder
Adds settings to the existing order by clause.- Specified by:
addOrderBy
in interfaceStructuredQuery.Builder<V>
-
-