@Target({METHOD,PARAMETER})
@Retention(RUNTIME)
public @interface MappingParameter
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.Modifier and Type | Required Element | Description |
---|---|---|
java.lang.String |
value |
The name of the query parameter the annotated getter or parameter should map to.
|
Copyright © 2014–2020 Blazebit. All rights reserved.