Class ReferenceFileServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl<java.lang.Long,ReferenceFile>
-
- ca.corefacility.bioinformatics.irida.service.impl.ReferenceFileServiceImpl
-
- All Implemented Interfaces:
CRUDService<java.lang.Long,ReferenceFile>,ReferenceFileService
@Service public class ReferenceFileServiceImpl extends CRUDServiceImpl<java.lang.Long,ReferenceFile> implements ReferenceFileService
Service for storing and readingReferenceFileobjects
-
-
Field Summary
-
Fields inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
CREATED_DATE_SORT_PROPERTY, repository, validator, valueType
-
-
Constructor Summary
Constructors Constructor Description ReferenceFileServiceImpl(ReferenceFileRepository repository, ProjectReferenceFileJoinRepository prfjRepository, javax.validation.Validator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReferenceFilecreate(ReferenceFile object)Create a new object in the persistence store.voiddelete(java.lang.Long id)Delete the object with the specified identifier from the database.java.util.List<Join<Project,ReferenceFile>>getReferenceFilesForProject(Project project)Get the collection ofReferenceFileattached to the specifiedProject.ReferenceFileread(java.lang.Long id)Read the object type by unique identifier.-
Methods inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
count, exists, findAll, findRevisions, findRevisions, list, list, list, readMultiple, search, search, update, updateFields, updateMultiple
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.service.CRUDService
count, exists, findAll, findRevisions, findRevisions, list, list, list, readMultiple, search, search, update, updateFields, updateMultiple
-
-
-
-
Constructor Detail
-
ReferenceFileServiceImpl
@Autowired public ReferenceFileServiceImpl(ReferenceFileRepository repository, ProjectReferenceFileJoinRepository prfjRepository, javax.validation.Validator validator)
-
-
Method Detail
-
read
@PreAuthorize("hasRole(\'ROLE_ADMIN\') or hasPermission(#id, \'canReadReferenceFile\')") public ReferenceFile read(java.lang.Long id) throws EntityNotFoundExceptionRead the object type by unique identifier.- Specified by:
readin interfaceCRUDService<java.lang.Long,ReferenceFile>- Overrides:
readin classCRUDServiceImpl<java.lang.Long,ReferenceFile>- Parameters:
id- The unique identifier for this object.- Returns:
- The object corresponding to the unique identifier.
- Throws:
EntityNotFoundException- If the identifier does not exist in the database.
-
getReferenceFilesForProject
@PreAuthorize("hasRole(\'ROLE_ADMIN\') or hasPermission(#project, \'canReadProject\')") public java.util.List<Join<Project,ReferenceFile>> getReferenceFilesForProject(Project project)Get the collection ofReferenceFileattached to the specifiedProject.- Specified by:
getReferenceFilesForProjectin interfaceReferenceFileService- Parameters:
project- theProjectto getReferenceFiles for.- Returns:
- the collection of
ReferenceFileattached to theProject.
-
create
@PreAuthorize("hasRole(\'ROLE_USER\')") public ReferenceFile create(ReferenceFile object) throws javax.validation.ConstraintViolationException, EntityExistsExceptionCreate a new object in the persistence store.- Specified by:
createin interfaceCRUDService<java.lang.Long,ReferenceFile>- Overrides:
createin classCRUDServiceImpl<java.lang.Long,ReferenceFile>- Parameters:
object- The object to persist.- Returns:
- The object as it was persisted in the database. May modify the identifier of the object when returned.
- Throws:
javax.validation.ConstraintViolationException- If the object being persisted cannot be validated by validation rules associated with the object.EntityExistsException- If the object being persisted violates uniqueness constraints in the database.
-
delete
@PreAuthorize("hasRole(\'ROLE_ADMIN\') or hasPermission(#id, \'canUpdateReferenceFile\')") public void delete(java.lang.Long id) throws EntityNotFoundExceptionDelete the object with the specified identifier from the database.- Specified by:
deletein interfaceCRUDService<java.lang.Long,ReferenceFile>- Overrides:
deletein classCRUDServiceImpl<java.lang.Long,ReferenceFile>- Parameters:
id- The identifier of the object to delete.- Throws:
EntityNotFoundException- If no object with the specified identifier exists in the database.
-
-