public class MongoQueryMethod extends QueryMethod
QueryMethod.| Constructor and Description |
|---|
MongoQueryMethod(Method method,
RepositoryMetadata metadata,
ProjectionFactory projectionFactory,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Creates a new
MongoQueryMethod from the given Method. |
| Modifier and Type | Method and Description |
|---|---|
protected MongoParameters |
createParameters(Method method) |
String[] |
getAnnotatedAggregation()
Returns the aggregation pipeline declared in a
Aggregation annotation. |
String |
getAnnotatedCollation()
Get the collation value extracted from the
Query or Aggregation annotation. |
String |
getAnnotatedSort()
Get the sort value, used as default, extracted from the
Query annotation. |
protected Class<?> |
getDomainClass() |
MongoEntityMetadata<?> |
getEntityInformation() |
MongoParameters |
getParameters() |
Meta |
getQueryMetaAttributes()
Returns the
Meta attributes to be applied. |
boolean |
hasAnnotatedAggregation()
Returns whether the method has an annotated query.
|
boolean |
hasAnnotatedCollation()
Check if the query method is decorated with an non empty
Query.collation() or or
Aggregation.collation(). |
boolean |
hasAnnotatedQuery()
Returns whether the method has an annotated query.
|
boolean |
hasAnnotatedSort()
Check if the query method is decorated with an non empty
Query.sort(). |
boolean |
hasQueryMetaAttributes() |
boolean |
isGeoNearQuery()
Returns whether the query is a geo near query.
|
getName, getNamedQueryName, getResultProcessor, getReturnedObjectType, isCollectionQuery, isModifyingQuery, isPageQuery, isQueryForEntity, isSliceQuery, isStreamQuery, toStringpublic MongoQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory projectionFactory, MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
MongoQueryMethod from the given Method.method - must not be null.metadata - must not be null.projectionFactory - must not be null.mappingContext - must not be null.protected MongoParameters createParameters(Method method)
createParameters in class QueryMethodpublic boolean hasAnnotatedQuery()
public MongoEntityMetadata<?> getEntityInformation()
getEntityInformation in class QueryMethodprotected Class<?> getDomainClass()
getDomainClass in class QueryMethodpublic MongoParameters getParameters()
getParameters in class QueryMethodpublic boolean isGeoNearQuery()
public boolean hasQueryMetaAttributes()
Meta annotation is available.public Meta getQueryMetaAttributes()
Meta attributes to be applied.public boolean hasAnnotatedSort()
Query.sort().Query having an non empty sort attribute.public String getAnnotatedSort()
Query annotation.Query.sort() value.IllegalStateException - if method not annotated with Query. Make sure to check
hasAnnotatedQuery() first.public boolean hasAnnotatedCollation()
Query.collation() or or
Aggregation.collation().Query or Aggregation having a non-empty collation attribute.public String getAnnotatedCollation()
Query or Aggregation annotation.Query.collation() or or Aggregation.collation() value.IllegalStateException - if method not annotated with Query or Aggregation. Make sure to check
hasAnnotatedQuery() first.public boolean hasAnnotatedAggregation()
Aggregation is present.public String[] getAnnotatedAggregation()
Aggregation annotation.IllegalStateException - if method not annotated with Aggregation. Make sure to check
hasAnnotatedAggregation() first.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.