jsolve/sweetener — pull request #55 by tkurylek (2014-03-13 18:34:08+00:00)
Title: SW-30 Supported mapping java.util.Map of mappable objects

Related issue #54

I have added two more parameters to `@Map` annotations -- `keysAs` and `valuesAs` -- so it's possible to map `java.util.Map` collections via AnnotationDrivenMapper.

Given the example in issue #54 you can annotate your class as follows:
``` java
@MappableTo(StudentWithGradeSnapshots.class)
class StudentWithGrades {

@Map(to = "gradeSnapshots", keysAs = ExamSnapshot.class, valuesAs = GradeSnapshot.class)
Map grades;
}
```
After that the `grades` field of `StudentWithGrades` class can be mapped to `gradeSnapshots` of `StudentWithGradeSnapshots`.