return moArrayValue;
}
}
else if (propertyType.isCollection())
{
CollectionMetaType collectionType = CollectionMetaType.class.cast(propertyType);
if (AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE == collectionType.getElementType())
{
Collection<?> cvalue = getAsCollection(value);
List<GenericValueSupport> tmp = new ArrayList<GenericValueSupport>();
for(Object element : cvalue)
{
ManagedObject mo = mof.initManagedObject((Serializable) element, null, null);
tmp.add(new GenericValueSupport(AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE, mo));
}
GenericValueSupport[] mos = new GenericValueSupport[tmp.size()];
CollectionMetaType moType = new CollectionMetaType(propertyType.getClassName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
return new CollectionValueSupport(moType, tmp.toArray(mos));
}
}
return metaValueFactory.create(value, propertyInfo.getType());