#115 - Mapping - Add support for @ElementCollection enhancement

Add simple Map support with Json
This commit is contained in:
Rob Bygrave
2018-03-21 00:15:40 +13:00
parent 85c4385498
commit 057d7480b0
23 changed files with 844 additions and 484 deletions
@@ -17,7 +17,7 @@ import java.util.Map.Entry;
/**
* Helper specifically for dealing with Maps.
*/
public final class BeanMapHelp<T> extends BaseCollectionHelp<T> {
public class BeanMapHelp<T> extends BaseCollectionHelp<T> {
private final BeanPropertyAssocMany<T> many;
private final BeanDescriptor<T> targetDescriptor;
@@ -175,8 +175,7 @@ public final class BeanMapHelp<T> extends BaseCollectionHelp<T> {
if (!map.isEmpty() || ctx.isIncludeEmpty()) {
ctx.beginAssocMany(name);
for (Entry<?, ?> entry : map.entrySet()) {
//FIXME: json write map key ...
targetDescriptor.jsonWrite(ctx, (EntityBean) entry.getValue());
many.jsonWriteMapEntry(ctx, entry);
}
ctx.endAssocMany();
}