1 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
3 import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
4 import org.openecomp.sdcrests.mapping.MappingBase;
5 import org.openecomp.sdcrests.vendorlicense.types.LimitEntityDto;
6 import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
8 public class MapLimitEntityToLimitDto extends MappingBase<LimitEntity, LimitEntityDto> {
11 public void doMapping(LimitEntity source, LimitEntityDto target) {
12 target.setId(source.getId());
13 target.setName(source.getName());
14 target.setDescription(source.getDescription());
15 target.setMetric(source.getMetric() != null ? source.getMetric().name() : null);
16 target.setAggregationFunction(source.getAggregationFunction() != null ? source
17 .getAggregationFunction().name() : null);
18 target.setTime(source.getTime() != null ? source.getTime().name() : null);
19 target.setType(source.getType() != null ? source.getType().name() : null);
20 target.setUnit(source.getUnit());
21 target.setValue(source.getValue());