}
}
private static void createFeatures(IPersistenceManager persistenceManager, W3CWidget model, IWidget widget){
for(IFeatureEntity featureEntity: model.getFeatures()){
IFeature feature = persistenceManager.newInstance(IFeature.class);
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);
}
}
}