a0226c1626847b3f7216d03318883f76534b83c2
[sdc.git] /
1 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
2
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
7 public class MapLimitEntityToLimitDto extends MappingBase<LimitEntity, LimitEntityDto> {
8
9   @Override
10   public void doMapping(LimitEntity source, LimitEntityDto target) {
11     target.setId(source.getId());
12     target.setName(source.getName());
13     target.setDescription(source.getDescription());
14     target.setMetric(source.getMetric());
15     target.setAggregationFunction(source.getAggregationFunction() != null ? source
16         .getAggregationFunction().name() : null);
17     target.setTime(source.getTime());
18     target.setType(source.getType() != null ? source.getType().name() : null);
19     target.setUnit(source.getUnit());
20     target.setValue(source.getValue());
21   }
22 }