@Target(value={METHOD,PARAMETER}) @Retention(value=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 and Description |
---|---|
FetchStrategy |
fetch
The fetch strategy to use for the attribute.
|
String[] |
fetches
The associations of the entity that should be fetched.
|
String |
value
The JPQL expression mapping the annotated getter or parameter should map to.
|
public abstract String value
public abstract String[] fetches
public abstract FetchStrategy fetch
Copyright © 2014–2017 Blazebit. All rights reserved.