Annotation Interface WebQuery
Declares shared web-query metadata for a controller method.
This annotation is intended to be placed on handler methods so query-related configuration can be defined once and reused by both filtering and sorting argument resolvers.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<?> Entity class against which filter and sort fields are resolved. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?> Optional DTO class used as the API-facing query contract.Optional field mappings used to expose API-facing aliases for entity fields.
-
Element Details
-
entityClass
Class<?> entityClassEntity class against which filter and sort fields are resolved.- Returns:
- target entity class
-
dtoClass
Class<?> dtoClassOptional DTO class used as the API-facing query contract.When set, incoming filter/sort paths are validated against this DTO and translated to entity paths (optionally using
MapsTo). When left asvoid.class, entity fields are used directly.- Returns:
- DTO class or
void.classwhen DTO mapping is disabled
- Default:
void.class
-
fieldMappings
FieldMapping[] fieldMappingsOptional field mappings used to expose API-facing aliases for entity fields.These mappings are applied in entity-aware mode (
dtoClass = void.class). In DTO-aware mode, path translation is driven byMapsToannotations on DTO fields.- Returns:
- mappings between API names and entity paths
- Default:
{}
-