Package com.googlecode.objectify.impl
Class QueryDef
- java.lang.Object
-
- com.googlecode.objectify.impl.QueryDef
-
public class QueryDef extends Object
The SDK Query hierarchy and associated builders make it hard to convert between keys-only entity, and projection. So we have to store the state of the query ourselves.- Author:
- Jeff Schnitzer
-
-
Constructor Summary
Constructors Constructor Description QueryDef()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryDef
andFilter(com.google.cloud.datastore.StructuredQuery.Filter addFilter)
Convenince method that creates a composite filter with any existing filter (if present)QueryDef
distinctOn(String distinctOn)
QueryDef
distinctOnAll(boolean distinctOnAll)
At the last minute add distinct on all projected fields.QueryDef
endCursor(com.google.cloud.datastore.Cursor endCursor)
QueryDef
filter(com.google.cloud.datastore.StructuredQuery.Filter filter)
QueryDef
kind(String kind)
QueryDef
limit(Integer limit)
QueryDef
namespace(String namespace)
com.google.cloud.datastore.EntityQuery
newEntityQuery()
com.google.cloud.datastore.KeyQuery
newKeyQuery()
com.google.cloud.datastore.ProjectionEntityQuery
newProjectionQuery()
QueryDef
offset(int offset)
QueryDef
orderBy(com.google.cloud.datastore.StructuredQuery.OrderBy orderBy)
QueryDef
project(String projection)
QueryDef
startCursor(com.google.cloud.datastore.Cursor startCursor)
-
-
-
Method Detail
-
filter
public QueryDef filter(com.google.cloud.datastore.StructuredQuery.Filter filter)
-
andFilter
public QueryDef andFilter(com.google.cloud.datastore.StructuredQuery.Filter addFilter)
Convenince method that creates a composite filter with any existing filter (if present)
-
distinctOnAll
public QueryDef distinctOnAll(boolean distinctOnAll)
At the last minute add distinct on all projected fields. This can be called before the projections are added.
-
orderBy
public QueryDef orderBy(com.google.cloud.datastore.StructuredQuery.OrderBy orderBy)
-
startCursor
public QueryDef startCursor(com.google.cloud.datastore.Cursor startCursor)
-
endCursor
public QueryDef endCursor(com.google.cloud.datastore.Cursor endCursor)
-
offset
public QueryDef offset(int offset)
-
newKeyQuery
public com.google.cloud.datastore.KeyQuery newKeyQuery()
-
newEntityQuery
public com.google.cloud.datastore.EntityQuery newEntityQuery()
-
newProjectionQuery
public com.google.cloud.datastore.ProjectionEntityQuery newProjectionQuery()
-
-