|
Download Sources | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface FlexMap
Used to define the Generics type on a Map property.
You can also define the Map implementation class for the generated java code.
Exemple :
public class MyEntity {
private Map<Integer, String> _names;
private Map<Integer, Integer> _idMap;
@FlexMap(key=Integer.class, entry=String.class)
public Map<Integer, String> getNames(){
return _names;
}
public void setName(Map<Integer, String> names){
_names = names;
}
@FlexMap(key=Integer.class, entry=Integer.class, clazz=TreeMap.class)
public List<Integer, Integer> getIdMap(){
return _selectedIds;
}
public void setIdMap(Map<Integer, Integer> ids){
_selectedIds = names;
}
}
| Required Element Summary | |
|---|---|
java.lang.Class |
entry
The class used as entry in the Map. |
java.lang.Class |
key
The class used as key in the Map. |
| Optional Element Summary | |
|---|---|
java.lang.Class<? extends java.util.Map> |
clazz
Defines the Map implementation class for the generated java code. |
| Element Detail |
|---|
public abstract java.lang.Class key
The class used as key in the Map.
public abstract java.lang.Class entry
The class used as entry in the Map.
public abstract java.lang.Class<? extends java.util.Map> clazz
Defines the Map implementation class for the generated java code.
The default value is java.util.HashMap
|
FlexGenerator | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||