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 invalid input: '<'[email protected]>
  • Constructor Details

    • QueryDef

      public QueryDef()
  • Method Details

    • namespace

      public QueryDef namespace(String namespace)
    • kind

      public QueryDef kind(String kind)
    • project

      public QueryDef project(String projection)
    • 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)
    • distinctOn

      public QueryDef distinctOn(String distinctOn)
    • 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)
    • limit

      public QueryDef limit(Integer limit)
    • newKeyQuery

      public com.google.cloud.datastore.KeyQuery newKeyQuery()
    • newEntityQuery

      public com.google.cloud.datastore.EntityQuery newEntityQuery()
    • newProjectionQuery

      public com.google.cloud.datastore.ProjectionEntityQuery newProjectionQuery()