{
//GenericMetaType genericMetaType = (GenericMetaType)metaType;
ManagedObjectImpl managedObject = new ManagedObjectImpl(propDefMap.getName());
for (PropertyDefinition mapMemberPropDef : propDefMap.getPropertyDefinitions().values())
{
ManagedPropertyImpl managedProp = new ManagedPropertyImpl(mapMemberPropDef.getName());
MetaType managedPropMetaType = ProfileServiceUtil.convertPropertyDefinitionToMetaType(mapMemberPropDef);
managedProp.setMetaType(managedPropMetaType);
managedProp.setManagedObject(managedObject);
managedObject.getProperties().put(managedProp.getName(), managedProp);
}
GenericValue genericValue = new GenericValueSupport(new GenericMetaType(propDefMap.getName(),
propDefMap.getDescription()), managedObject);
populateMetaValueFromProperty(propMap, genericValue, propDefMap);
return genericValue;