예제 #1
0
 public void importModel(ModelRepresentation model, KitDto kitDto) {
   kitService.create(createKitEntityFromModel(model, kitDto));
 }
예제 #2
0
 public List<KitDto> getAllKits() {
   return (List<KitDto>) mappingService.map(kitService.findAll(), KitDto.class);
 }
예제 #3
0
 public List<KitDto> getKitsForAdults() {
   return (List<KitDto>) mappingService.map(kitService.getKitsForAdults(), KitDto.class);
 }
예제 #4
0
 public KitDto getKit(String name) {
   return mappingService.map(kitService.findByName(name), KitDto.class);
 }
예제 #5
0
 public KitDto getKit(long id) {
   return mappingService.map(kitService.findById(id), KitDto.class);
 }
예제 #6
0
 public void removeKit(long id) {
   Kit kit = kitService.findById(id);
   kitService.remove(kit);
 }
예제 #7
0
 public void editKit(KitDto kitDto) {
   Kit kit = mappingService.map(kitDto, Kit.class);
   kitService.update(kit);
 }
예제 #8
0
 public long createKit(KitDto kitDto) {
   Kit kit = mappingService.map(kitDto, Kit.class);
   kitService.create(kit);
   return kit.getId();
 }