org.springframework.datastore.query
Class Projections

java.lang.Object
  extended by org.springframework.datastore.query.Projections

public class Projections
extends Object

Projections used to customize the results of a query

Since:
1.0

Field Summary
static Query.CountProjection COUNT_PROJECTION
           
static Query.IdProjection ID_PROJECTION
           
 
Constructor Summary
Projections()
           
 
Method Summary
static Query.AvgProjection avg(String name)
          Computes the average value of a property
static Query.CountProjection count()
          Projection that returns the number of records from the query instead of the results themselves
static Query.IdProjection id()
          Projection used to obtain the id of an object
static Query.MaxProjection max(String name)
          Computes the max value of a property
static Query.MinProjection min(String name)
          Computes the min value of a property
static Query.PropertyProjection property(String name)
          A projection that obtains the value of a property of an entity
static Query.SumProjection sum(String name)
          Computes the sum of a property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_PROJECTION

public static final Query.IdProjection ID_PROJECTION

COUNT_PROJECTION

public static final Query.CountProjection COUNT_PROJECTION
Constructor Detail

Projections

public Projections()
Method Detail

id

public static Query.IdProjection id()
Projection used to obtain the id of an object

Returns:
The IdProjection instance

count

public static Query.CountProjection count()
Projection that returns the number of records from the query instead of the results themselves

Returns:
The CountProjection instance

property

public static Query.PropertyProjection property(String name)
A projection that obtains the value of a property of an entity

Parameters:
name - The name of the property
Returns:
The PropertyProjection instance

sum

public static Query.SumProjection sum(String name)
Computes the sum of a property

Parameters:
name - The name of the property
Returns:
The PropertyProjection instance

min

public static Query.MinProjection min(String name)
Computes the min value of a property

Parameters:
name - The name of the property
Returns:
The PropertyProjection instance

max

public static Query.MaxProjection max(String name)
Computes the max value of a property

Parameters:
name - The name of the property
Returns:
The PropertyProjection instance

avg

public static Query.AvgProjection avg(String name)
Computes the average value of a property

Parameters:
name - The name of the property
Returns:
The PropertyProjection instance