@Target({METHOD,PARAMETER})
@Retention(RUNTIME)
public @interface Mapping
Example 1:
public String getName();
Example 2:
@Mapping("UPPER(name)")
public String getUpperName();
Example 1 shows a getter which is implicitly mapped to the attribute name which in this case is "name".
Example 2 shows that a mapping can contain arbitrary JPQL expressions.Modifier and Type | Optional Element | Description |
---|---|---|
FetchStrategy |
fetch |
The fetch strategy to use for the attribute.
|
java.lang.String[] |
fetches |
The associations of the entity that should be fetched.
|
java.lang.String |
value |
The JPQL expression mapping the annotated getter or parameter should map to.
|
java.lang.String value
java.lang.String[] fetches
FetchStrategy fetch
Copyright © 2014–2018 Blazebit. All rights reserved.