@@ -0,0 +1,1495 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage cz.muni.fi.pa165.facade;%0A%0Aimport cz.muni.fi.pa165.dto.BookCollectionDTO;%0Aimport cz.muni.fi.pa165.dto.CreateBookCollectionDTO;%0Aimport cz.muni.fi.pa165.entity.BookCollection;%0Aimport cz.muni.fi.pa165.facade.BookCollectionFacade;%0Aimport cz.muni.fi.pa165.service.BookCollectionService;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport javax.inject.Inject;%0Aimport org.dozer.Mapper;%0A%0A/**%0A *%0A * @author xkubist%0A * @email m.kubistel@gmail.com%0A */%0Apublic class BookCollectionFacadeImpl implements BookCollectionFacade%7B%0A    @Inject%0A    BookCollectionService service;%0A    %0A    @Inject%0A    Mapper mapper;%0A%0A    @Override%0A     public void createBookCollection(CreateBookCollectionDTO bookCollection)%7B%0A        service.create(mapper.map(bookCollection, BookCollection.class));%0A    %7D%0A%0A    @Override%0A    public BookCollectionDTO findById(Long id)%7B%0A        return mapper.map(service.findById(id), BookCollectionDTO.class);%0A    %7D%0A    %0A    @Override%0A    public List%3CBookCollectionDTO%3E findAll()%7B%0A        List%3CBookCollection%3E list = service.findAll();%0A        List%3CBookCollectionDTO%3E finalList = new ArrayList%3C%3E();%0A        for (BookCollection bookCollection : list) %7B%0A            finalList.add(mapper.map(bookCollection, BookCollectionDTO.class));%0A        %7D%0A        return finalList;%0A    %7D%0A%0A    @Override%0A    public void delete(Long bookId)%7B%0A        service.delete(service.findById(bookId));%0A    %7D%0A%0A%0A%7D

add BookCollectionFacadeImpl class