public TableValue createTableValue(TableMetaType type, Map value, Map<Object, MetaValue> mapping)
{
if (value == null)
return null;
TableValueSupport table = new TableValueSupport(type);
mapping.put(value, table);
CompositeMetaType entryType = type.getRowType();
MetaType keyType = entryType.getType(DefaultMetaTypeFactory.MAP_KEY);
MetaType valType = entryType.getType(DefaultMetaTypeFactory.MAP_VALUE);
for (Iterator<Map.Entry> i = value.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = i.next();
MetaValue key = internalCreate(entry.getKey(), null, keyType);
MetaValue val = internalCreate(entry.getValue(), null, valType);
CompositeValueSupport data = new CompositeValueSupport(entryType, DefaultMetaTypeFactory.MAP_ITEM_NAMES, new MetaValue[] { key, val });
table.put(data);
}
return table;
}