}
for(Field field:info.manyFieldMap.keySet()){
try {
Map<FieldMapKeys, Object> map = info.manyFieldMap.get(field);
RelationMode mode = (RelationMode)map.get(FieldMapKeys.MODE);
switch(mode){
case AGGREGATION:
Util.setField(this, field,
new ProxyMany((Class<?>)map.get(FieldMapKeys.CLASS), this,
(RelationMode)map.get(FieldMapKeys.MODE), field));
break;
case RELATION:
Util.setField(this, field,
new ProxyMany((Class<?>)map.get(FieldMapKeys.CLASS), this,
(RelationMode)map.get(FieldMapKeys.MODE), (Field)map.get(FieldMapKeys.FIELD)));
break;
}
} catch (Exception e) {
throw new SienaException(e);
}
}
for(Field field:info.oneFieldMap.keySet()){
try {
Map<FieldMapKeys, Object> map = info.oneFieldMap.get(field);
RelationMode mode = (RelationMode)map.get(FieldMapKeys.MODE);
switch(mode){
case AGGREGATION:
Util.setField(this, field,
new ProxyOne((Class<?>)map.get(FieldMapKeys.CLASS), this,
(RelationMode)map.get(FieldMapKeys.MODE), field));