diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapQuestionnaireToQuestionnaireDto.java')
1 files changed, 21 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapQuestionnaireToQuestionnaireDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapQuestionnaireToQuestionnaireDto.java new file mode 100644 index 0000000000..f47f7834fb --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapQuestionnaireToQuestionnaireDto.java @@ -0,0 +1,21 @@ +package org.openecomp.sdcrests.vsp.rest.mapping; + +import org.openecomp.core.utilities.json.JsonUtil; +import org.openecomp.sdc.vendorsoftwareproduct.dao.type.CompositionEntity; +import org.openecomp.sdcrests.mapping.MappingBase; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireDto; + +import java.util.HashMap; + +/** + * Created by ayalaben on 9/26/2017 + */ +public class MapQuestionnaireToQuestionnaireDto extends + MappingBase<CompositionEntity, QuestionnaireDto> { + + @Override + public void doMapping(CompositionEntity source, QuestionnaireDto target) { + target.setId(source.getId()); + target.setQuestionareData(JsonUtil.json2Object(source.getQuestionnaireData(), HashMap.class)); + } +} |