Package io.micronaut.data.annotation
Annotation Interface TypeRole
@Retention(RUNTIME)
@Target({METHOD,FIELD,ANNOTATION_TYPE})
@Documented
@Inherited
public @interface TypeRole
A type role indicates a method element in a repository that plays a role in query execution and should
not be factored into query calculation but instead made available at runtime using the specified role name.
This is used for example to configure a Pageable
object to be handled differently
to other query arguments.
The parameter names of each role can be resolved from the MethodInvocationContext
as a member of the
DataMethod
annotation where the member name is the role name.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Required Element Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The parameter that is used to represent aCursoredPage
.static final String
The parameter that defines an iterable of the entity instances.static final String
The parameter that defines an instance of the entity.static final String
The parameter that is used for the ID of entity.static final String
The parameter that is used to represent aPage
.static final String
The parameter that is used for pagination.static final String
The parameter that is used for pageable which is no un-paged.static final String
The parameter that is used to represent aSlice
.static final String
The parameter that is used for sorting.
-
Field Details
-
PAGEABLE
The parameter that is used for pagination.- See Also:
-
SORT
The parameter that is used for sorting.- See Also:
-
ID
The parameter that is used for the ID of entity.- See Also:
-
ENTITY
The parameter that defines an instance of the entity.- See Also:
-
ENTITIES
The parameter that defines an iterable of the entity instances.- See Also:
-
SLICE
The parameter that is used to represent aSlice
.- See Also:
-
PAGE
The parameter that is used to represent aPage
.- See Also:
-
CURSORED_PAGE
The parameter that is used to represent aCursoredPage
.- See Also:
-
PAGEABLE_REQUIRED
The parameter that is used for pageable which is no un-paged.- See Also:
-
-
Element Details