1886dc462cf168a1eaf95bf4464c52e655c50c42
[sdc.git] /
1 package org.openecomp.sdcrests.item.rest.mapping;
2
3 import org.openecomp.sdc.versioning.types.Item;
4 import org.openecomp.sdc.versioning.types.ItemStatus;
5 import org.openecomp.sdcrests.item.types.ItemDto;
6 import org.openecomp.sdcrests.mapping.MappingBase;
7
8 public class MapItemToDto extends MappingBase<Item, ItemDto> {
9   @Override
10   public void doMapping(Item source, ItemDto target) {
11     target.setId(source.getId());
12     target.setType(source.getType());
13     target.setName(source.getName());
14     target.setDescription(source.getDescription());
15     target.setOwner(source.getOwner());
16     target.setStatus(source.getStatus().name());
17   }
18 }