throws LayerException {
if (entity == null) {
return null;
}
PrimitiveAttributeInfo idInfo = associationAttributeInfo.getFeature().getIdentifier();
FeatureInfo childInfo = associationAttributeInfo.getFeature();
PrimitiveAttribute<?> id;
try {
id = (PrimitiveAttribute) dtoConverterService.toDto(entity.getId(idInfo.getName()), idInfo);
} catch (GeomajasException e) {
throw new LayerException(e, ExceptionCode.CONVERSION_PROBLEM);
}
Map<String, Attribute<?>> attributes = new HashMap<String, Attribute<?>>();
for (AttributeInfo attributeInfo : childInfo.getAttributes()) {
attributes.put(attributeInfo.getName(),
getRecursiveAttribute(entity, childInfo, new String[] { attributeInfo.getName() }));
}
AssociationValue value = new AssociationValue(id, attributes, false);
return value;