@Introspected
public interface QueryBuilder
Modifier and Type | Method and Description |
---|---|
QueryResult |
buildDelete(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(QueryModel query)
Encode the given query into the encoded query instance.
|
QueryResult |
buildUpdate(QueryModel query,
java.util.List<java.lang.String> propertiesToUpdate)
Encode the given query into the encoded query instance.
|
static QueryBuilder |
newQueryBuilder(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
Build a query build from the configured annotation metadata.
|
@Nullable QueryResult buildInsert(io.micronaut.core.annotation.AnnotationMetadata repositoryMetadata, PersistentEntity entity)
repositoryMetadata
- The repository annotation metadataentity
- The entity@NonNull QueryResult buildQuery(@NonNull QueryModel query)
query
- The query@NonNull QueryResult buildUpdate(@NonNull QueryModel query, java.util.List<java.lang.String> propertiesToUpdate)
query
- The querypropertiesToUpdate
- The property names to update@NonNull QueryResult buildDelete(@NonNull QueryModel query)
query
- The query@NonNull QueryResult buildOrderBy(@NonNull PersistentEntity entity, @NonNull Sort sort)
entity
- The root entitysort
- The sort@NonNull QueryResult buildPagination(@NonNull Pageable pageable)
pageable
- The pageable@NonNull static QueryBuilder newQueryBuilder(@NonNull io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
annotationMetadata
- The annotation metadata.