Package no.nsd.qddt.domain.author
Class AuthorServiceImpl
- java.lang.Object
-
- no.nsd.qddt.domain.author.AuthorServiceImpl
-
- All Implemented Interfaces:
AuthorService
,BaseService<Author,java.util.UUID>
@Service("authorService") public class AuthorServiceImpl extends java.lang.Object implements AuthorService
-
-
Constructor Summary
Constructors Constructor Description AuthorServiceImpl(AuthorRepository authorRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count()
void
delete(java.util.List<Author> instances)
Deletes object with these IDs from backstore, exception raised by failure.void
delete(java.util.UUID uuid)
Deletes object with id ID from backstore, exception raised by failure.boolean
exists(java.util.UUID uuid)
org.springframework.data.domain.Page<Author>
findAllPageable(org.springframework.data.domain.Pageable pageable)
Author
findOne(java.util.UUID uuid)
Return a entity based on its ID.protected Author
postLoadProcessing(Author instance)
protected Author
prePersistProcessing(Author instance)
Author
save(Author instance)
Store object T to backstore
-
-
-
Constructor Detail
-
AuthorServiceImpl
@Autowired public AuthorServiceImpl(AuthorRepository authorRepository)
-
-
Method Detail
-
count
public long count()
- Specified by:
count
in interfaceBaseService<Author,java.util.UUID>
- Returns:
- number of entities
-
exists
public boolean exists(java.util.UUID uuid)
- Specified by:
exists
in interfaceBaseService<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 interfaceBaseService<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 interfaceBaseService<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 interfaceBaseService<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 interfaceBaseService<Author,java.util.UUID>
- Parameters:
instances
- list of entity IDs
-
findAllPageable
public org.springframework.data.domain.Page<Author> findAllPageable(org.springframework.data.domain.Pageable pageable)
- Specified by:
findAllPageable
in interfaceAuthorService
-
-