Class AuthorServiceImpl

    • Constructor Detail

      • AuthorServiceImpl

        @Autowired
        public AuthorServiceImpl​(AuthorRepository authorRepository)
    • Method Detail

      • count

        public long count()
        Specified by:
        count in interface BaseService<Author,​java.util.UUID>
        Returns:
        number of entities
      • exists

        public boolean exists​(java.util.UUID uuid)
        Specified by:
        exists in interface BaseService<Author,​java.util.UUID>
        Parameters:
        uuid - ID of entity
        Returns:
        true if exists
      • findOne

        public Author findOne​(java.util.UUID uuid)
        Description copied from interface: BaseService
        Return a entity based on its ID.
        Specified by:
        findOne in interface BaseService<Author,​java.util.UUID>
        Parameters:
        uuid - ID of entity
        Returns:
        Entity
      • save

        @PreAuthorize("hasAnyAuthority(\'ROLE_ADMIN\',\'ROLE_EDITOR\')")
        public Author save​(Author instance)
        Description copied from interface: BaseService
        Store object T to backstore
        Specified by:
        save in interface BaseService<Author,​java.util.UUID>
        Parameters:
        instance - object T
        Returns:
        saved instance T (may have fields updated by backstore)
      • delete

        public void delete​(java.util.UUID uuid)
        Description copied from interface: BaseService
        Deletes object with id ID from backstore, exception raised by failure.
        Specified by:
        delete in interface BaseService<Author,​java.util.UUID>
        Parameters:
        uuid - ID of entity
      • delete

        public void delete​(java.util.List<Author> instances)
        Description copied from interface: BaseService
        Deletes object with these IDs from backstore, exception raised by failure.
        Specified by:
        delete in interface BaseService<Author,​java.util.UUID>
        Parameters:
        instances - list of entity IDs
      • prePersistProcessing

        protected Author prePersistProcessing​(Author instance)
      • postLoadProcessing

        protected Author postLoadProcessing​(Author instance)
      • findAllPageable

        public org.springframework.data.domain.Page<Author> findAllPageable​(org.springframework.data.domain.Pageable pageable)
        Specified by:
        findAllPageable in interface AuthorService