@Override
 public Gallery update(GalleryDTO galleryDTO) {
   galleryValidator.validate(galleryDTO);
   Gallery gallery = galleryConverter.convert(galleryDTO);
   galleryDAO.update(gallery);
   return gallery;
 }
 @Override
 public GalleryDTO get(Long id) {
   Gallery gallery = galleryDAO.getRequired(id);
   // gallery.setCategories(null);
   GalleryDTO galleryDTO = galleryConverter.convert(gallery);
   //  galleryDTO.setCategoryDTOs(null);
   //  galleryDTO.setAddition(null);
   return galleryDTO;
 }
  @Override
  public GalleryDTO getWithPagingList(Long id, int page, int size) {

    Gallery gallery = galleryDAO.getRequired(id);
    //  gallery.setCategories(null);

    GalleryDTO galleryDTO = galleryConverter.convert(gallery);
    //  galleryDTO.setCategoryDTOs(null);
    galleryDTO.setAddition(buildPage(id, page, size));
    return galleryDTO;
  }
 @Override
 public GalleryDTO updateDTO(GalleryDTO galleryDTO) {
   galleryValidator.validate(galleryDTO);
   galleryDAO.update(galleryConverter.convert(galleryDTO));
   return galleryDTO;
 }