aboutsummaryrefslogtreecommitdiffstats
path: root/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
blob: f47f7834fba8f96acd6e0f794ba88da5586c342c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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));
  }
}