Package io.micronaut.data.model.query
Interface ProjectionList
-
public interface ProjectionListModels a list of projections.- Since:
- 1.0
- Author:
- Graeme Rocher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProjectionListadd(QueryModel.Projection projection)Adds a projection to the projection list.ProjectionListavg(java.lang.String name)Computes the average value of a property.ProjectionListcount()Count the number of records returned.ProjectionListcountDistinct(java.lang.String property)Count the number of records returned.ProjectionListdistinct()Projection to return only distinct records.ProjectionListdistinct(java.lang.String property)Projection to return only distinct properties.ProjectionListgroupProperty(java.lang.String property)Defines a group by projection for datastores that support it.ProjectionListid()A Projection that obtains the id of an object.ProjectionListmax(java.lang.String name)Computes the pageSize value of a property.ProjectionListmin(java.lang.String name)Computes the min value of a property.ProjectionListproperty(java.lang.String name)A projection that obtains the value of a property of an entity.ProjectionListrowCount()Count the number of records returned.ProjectionListsum(java.lang.String name)Computes the sum of a property.
-
-
-
Method Detail
-
id
ProjectionList id()
A Projection that obtains the id of an object.- Returns:
- The projection list
-
count
ProjectionList count()
Count the number of records returned.- Returns:
- The projection list
-
countDistinct
ProjectionList countDistinct(java.lang.String property)
Count the number of records returned.- Parameters:
property- The property name to count- Returns:
- The projection list
-
groupProperty
ProjectionList groupProperty(java.lang.String property)
Defines a group by projection for datastores that support it.- Parameters:
property- The property name- Returns:
- The projection list
-
distinct
ProjectionList distinct()
Projection to return only distinct records.- Returns:
- The projection list
-
distinct
ProjectionList distinct(java.lang.String property)
Projection to return only distinct properties.- Parameters:
property- The property name to use- Returns:
- The projection list
-
rowCount
ProjectionList rowCount()
Count the number of records returned.- Returns:
- The projection list
-
property
ProjectionList property(java.lang.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
ProjectionList sum(java.lang.String name)
Computes the sum of a property.- Parameters:
name- The name of the property- Returns:
- The PropertyProjection instance
-
min
ProjectionList min(java.lang.String name)
Computes the min value of a property.- Parameters:
name- The name of the property- Returns:
- The PropertyProjection instance
-
max
ProjectionList max(java.lang.String name)
Computes the pageSize value of a property.- Parameters:
name- The name of the property- Returns:
- The PropertyProjection instance
-
avg
ProjectionList avg(java.lang.String name)
Computes the average value of a property.- Parameters:
name- The name of the property- Returns:
- The PropertyProjection instance
-
add
ProjectionList add(@NonNull QueryModel.Projection projection)
Adds a projection to the projection list.- Parameters:
projection- The projection to add- Returns:
- This list
-
-