feature.setFeatureName(featureEntity.getName());
feature.setRequired(featureEntity.isRequired());
widget.getFeatures().add(feature);
// now attach all parameters to this feature.
for(IParamEntity paramEntity : featureEntity.getParams()){
IParam param = persistenceManager.newInstance(IParam.class);
param.setParameterName(paramEntity.getName());
param.setParameterValue(paramEntity.getValue());
feature.getParameters().add(param);
}
}
}