Annotation Type MappingParameter


@Target({METHOD,PARAMETER,FIELD})
@Retention(RUNTIME)
public @interface MappingParameter
A mapping to a parameter which is passed into a query when querying an entity view. The MappingParameter annotation can be applied to abstract getter methods of an interface or abstract class. It may also be applied to constructor parameters. Example 1: public Document(@MappingParameter("queryParam1") Integer queryParam1) { ... } Example 2: public Document(@Mapping("UPPER(name)") String upperName, @MappingParameter("queryParam1") Integer queryParam1) { ... } Example 1 shows a constructor that gets the query parameter "queryParam1" injected in the constructor when querying for an entity view. Example 2 is similar to example 1 but shows that a constructor can also contain parameters annotated Mapping in conjunction with mapping parameters.
Since:
1.0.0
Author:
Christian Beikov
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    String value
    The name of the query parameter the annotated getter or parameter should map to.
  • Element Details

    • value

      String value
      The name of the query parameter the annotated getter or parameter should map to.
      Returns:
      The name of the query parameter