Class NcbiExportSubmissionServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
-
- ca.corefacility.bioinformatics.irida.service.impl.export.NcbiExportSubmissionServiceImpl
-
- All Implemented Interfaces:
CRUDService<java.lang.Long,NcbiExportSubmission>
,NcbiExportSubmissionService
@Service public class NcbiExportSubmissionServiceImpl extends CRUDServiceImpl<java.lang.Long,NcbiExportSubmission> implements NcbiExportSubmissionService
Service impl for submitting data to NCBI
-
-
Field Summary
-
Fields inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
CREATED_DATE_SORT_PROPERTY, validator, valueType
-
-
Constructor Summary
Constructors Constructor Description NcbiExportSubmissionServiceImpl(NcbiExportSubmissionRepository repository, javax.validation.Validator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NcbiExportSubmission
create(NcbiExportSubmission object)
Create a new object in the persistence store.java.util.List<NcbiExportSubmission>
getSubmissionsForProject(Project project)
Get a List ofNcbiExportSubmission
for the givenProject
java.util.List<NcbiExportSubmission>
getSubmissionsWithState(ExportUploadState state)
Get a List ofNcbiExportSubmission
object with the givenExportUploadState
java.util.List<NcbiExportSubmission>
getSubmissionsWithState(java.util.Set<ExportUploadState> states)
Get a List ofNcbiExportSubmission
objects which have one of the givenExportUploadState
sorg.springframework.data.domain.Page<NcbiExportSubmission>
list(int page, int size, org.springframework.data.domain.Sort sort)
List objects ofType
in the database, limited to some specific pageorg.springframework.data.domain.Page<NcbiExportSubmission>
list(int page, int size, org.springframework.data.domain.Sort.Direction order, java.lang.String... sortProperties)
List objects ofType
in the database, limited to some specific page.NcbiExportSubmission
read(java.lang.Long id)
Read the object type by unique identifier.NcbiExportSubmission
update(NcbiExportSubmission object)
Update an object-
Methods inherited from class ca.corefacility.bioinformatics.irida.service.impl.CRUDServiceImpl
count, delete, exists, findAll, findRevisions, findRevisions, list, readMultiple, search, search, 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, delete, exists, findAll, findRevisions, findRevisions, list, readMultiple, search, search, updateFields, updateMultiple
-
-
-
-
Constructor Detail
-
NcbiExportSubmissionServiceImpl
@Autowired public NcbiExportSubmissionServiceImpl(NcbiExportSubmissionRepository repository, javax.validation.Validator validator)
-
-
Method Detail
-
read
@PreAuthorize("hasPermission(#id, \'canReadExportSubmission\')") public NcbiExportSubmission read(java.lang.Long id) throws EntityNotFoundException
Read the object type by unique identifier.- Specified by:
read
in interfaceCRUDService<java.lang.Long,NcbiExportSubmission>
- Overrides:
read
in classCRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
- 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.
-
create
@PreAuthorize("isAuthenticated()") public NcbiExportSubmission create(NcbiExportSubmission object) throws javax.validation.ConstraintViolationException, EntityExistsException
Create a new object in the persistence store.- Specified by:
create
in interfaceCRUDService<java.lang.Long,NcbiExportSubmission>
- Overrides:
create
in classCRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
- 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.
-
getSubmissionsWithState
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") public java.util.List<NcbiExportSubmission> getSubmissionsWithState(ExportUploadState state)
Get a List ofNcbiExportSubmission
object with the givenExportUploadState
- Specified by:
getSubmissionsWithState
in interfaceNcbiExportSubmissionService
- Parameters:
state
-ExportUploadState
to search for- Returns:
- a List of
NcbiExportSubmission
-
getSubmissionsWithState
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") public java.util.List<NcbiExportSubmission> getSubmissionsWithState(java.util.Set<ExportUploadState> states)
Get a List ofNcbiExportSubmission
objects which have one of the givenExportUploadState
s- Specified by:
getSubmissionsWithState
in interfaceNcbiExportSubmissionService
- Parameters:
states
- collection ofExportUploadState
to search for- Returns:
- a List of
NcbiExportSubmission
-
getSubmissionsForProject
@PreAuthorize("hasPermission(#project, \'canReadProject\')") @PostFilter("hasPermission(filterObject, \'canReadExportSubmission\')") public java.util.List<NcbiExportSubmission> getSubmissionsForProject(Project project)
Get a List ofNcbiExportSubmission
for the givenProject
- Specified by:
getSubmissionsForProject
in interfaceNcbiExportSubmissionService
- Parameters:
project
- TheProject
for the submission- Returns:
- a List of
NcbiExportSubmission
-
list
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") public org.springframework.data.domain.Page<NcbiExportSubmission> list(int page, int size, org.springframework.data.domain.Sort.Direction order, java.lang.String... sortProperties) throws java.lang.IllegalArgumentException
List objects ofType
in the database, limited to some specific page.- Specified by:
list
in interfaceCRUDService<java.lang.Long,NcbiExportSubmission>
- Overrides:
list
in classCRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
- Parameters:
page
- the specific page to use.size
- the size of the pages used to compute the number of pages.order
- the order of the sort.sortProperties
- the properties used to sort the collection.- Returns:
- the list of users within the specified range.
- Throws:
java.lang.IllegalArgumentException
- If theType
has no public propertysortProperty
.
-
list
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") public org.springframework.data.domain.Page<NcbiExportSubmission> list(int page, int size, org.springframework.data.domain.Sort sort) throws java.lang.IllegalArgumentException
List objects ofType
in the database, limited to some specific page- Specified by:
list
in interfaceCRUDService<java.lang.Long,NcbiExportSubmission>
- Overrides:
list
in classCRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
- Parameters:
page
- the specific page to usesize
- the size of the pagessort
- ASort
object for ordering the results- Returns:
- a list of objects in the given range
- Throws:
java.lang.IllegalArgumentException
-
update
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") public NcbiExportSubmission update(NcbiExportSubmission object)
Update an object- Specified by:
update
in interfaceCRUDService<java.lang.Long,NcbiExportSubmission>
- Overrides:
update
in classCRUDServiceImpl<java.lang.Long,NcbiExportSubmission>
- Parameters:
object
- The object to update- Returns:
- The updated object
-
-