Package io.micronaut.data.annotation
Annotation Interface RepositoryConfiguration
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,TYPE})
@Documented
public @interface RepositoryConfiguration
Models compilation time configuration for the repository. Typically used as a meta-annotation.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionCustom find interceptors definition.boolean
Does the repository allow implicit queries by type and ID etc.boolean
Whether named parameters starting with colon are supported in the query syntax.Class<? extends RepositoryOperations>
Class<? extends QueryBuilder>
The builder to use to encode queries.Class<?>[]
Custom data-transfer types that this repository supports.TypeRole[]
ConfiguresTypeRole
behaviour for a repository.
-
Element Details
-
queryBuilder
Class<? extends QueryBuilder> queryBuilderThe builder to use to encode queries. Defaults to JPA-QL.- Returns:
- The query builder
- Default:
- io.micronaut.data.model.query.builder.jpa.JpaQueryBuilder.class
-
operations
Class<? extends RepositoryOperations> operations- Returns:
- The default back end interface to use.
- Default:
- io.micronaut.data.operations.RepositoryOperations.class
-
typeRoles
TypeRole[] typeRolesConfiguresTypeRole
behaviour for a repository. This member allows for configuration of custom types that play different roles in the construction and execution of repositories. Note that additionalTypeConverter
instances may need to be registered if types that do not extend from the defaults are registered.- Returns:
- The parameter roles
- Default:
- {@io.micronaut.data.annotation.TypeRole(role="pageable", type=io.micronaut.data.model.Pageable.class), @io.micronaut.data.annotation.TypeRole(role="sort", type=io.micronaut.data.model.Sort.class), @io.micronaut.data.annotation.TypeRole(role="slice", type=io.micronaut.data.model.Slice.class), @io.micronaut.data.annotation.TypeRole(role="page", type=io.micronaut.data.model.Page.class)}
-
implicitQueries
boolean implicitQueriesDoes the repository allow implicit queries by type and ID etc. or are explicit query always needed.- Returns:
- True if it does
- Default:
- true
-
namedParameters
boolean namedParametersWhether named parameters starting with colon are supported in the query syntax.- Returns:
- True if named parameters are supported
- Default:
- true
-
queryDtoTypes
Class<?>[] queryDtoTypesCustom data-transfer types that this repository supports.- Returns:
- The DTO types
- Since:
- 4.0.0
- Default:
- {}
-
findInterceptors
FindInterceptorDef[] findInterceptorsCustom find interceptors definition.- Returns:
- The interceptor definitions.
- Since:
- 4.0.0
- Default:
- {}
-