@Internal public final class MongoQueryBuilder extends java.lang.Object implements QueryBuilder
Modifier and Type | Class and Description |
---|---|
protected class |
MongoQueryBuilder.QueryState
The state of the query.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
QUERY_PARAMETER_PLACEHOLDER
An object with this property is replaced with an actual query parameter at the runtime.
|
IN_VARIABLES_PATTERN, VARIABLE_PATTERN
Constructor and Description |
---|
MongoQueryBuilder() |
Modifier and Type | Method and Description |
---|---|
QueryResult |
buildDelete(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
QueryModel query)
Encode the given query into the encoded query instance.
|
QueryResult |
buildInsert(io.micronaut.core.annotation.AnnotationMetadata repositoryMetadata,
PersistentEntity entity)
Builds an insert statement for the given entity.
|
QueryResult |
buildOrderBy(PersistentEntity entity,
Sort sort)
Encode the given query into the encoded query instance.
|
QueryResult |
buildPagination(Pageable pageable)
Encode the pageable.
|
QueryResult |
buildQuery(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
QueryModel query)
Encode the given query for the passed annotation metadata and query.
|
QueryResult |
buildUpdate(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
QueryModel query,
java.util.List<java.lang.String> propertiesToUpdate)
Encode the given query into the encoded query instance.
|
QueryResult |
buildUpdate(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
QueryModel query,
java.util.Map<java.lang.String,java.lang.Object> propertiesToUpdate)
Encode the given query into the encoded query instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildDelete, buildQuery, buildUpdate, buildUpdate, newQueryBuilder, shouldAliasProjections, supportsForUpdate
public static final java.lang.String QUERY_PARAMETER_PLACEHOLDER
public QueryResult buildInsert(io.micronaut.core.annotation.AnnotationMetadata repositoryMetadata, PersistentEntity entity)
QueryBuilder
buildInsert
in interface QueryBuilder
repositoryMetadata
- The repository annotation metadataentity
- The entitypublic QueryResult buildQuery(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryModel query)
QueryBuilder
buildQuery
in interface QueryBuilder
annotationMetadata
- The annotation metadataquery
- The query modelpublic QueryResult buildUpdate(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryModel query, java.util.List<java.lang.String> propertiesToUpdate)
QueryBuilder
buildUpdate
in interface QueryBuilder
annotationMetadata
- The annotation metadataquery
- The querypropertiesToUpdate
- The property names to updatepublic QueryResult buildUpdate(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryModel query, java.util.Map<java.lang.String,java.lang.Object> propertiesToUpdate)
QueryBuilder
buildUpdate
in interface QueryBuilder
annotationMetadata
- The annotation metadataquery
- The querypropertiesToUpdate
- The property names to updatepublic QueryResult buildDelete(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryModel query)
QueryBuilder
buildDelete
in interface QueryBuilder
annotationMetadata
- The annotation metadataquery
- The querypublic QueryResult buildOrderBy(PersistentEntity entity, Sort sort)
QueryBuilder
buildOrderBy
in interface QueryBuilder
entity
- The root entitysort
- The sortpublic QueryResult buildPagination(Pageable pageable)
QueryBuilder
buildPagination
in interface QueryBuilder
pageable
- The pageable