Interface SecurableBaseReadOnlyService<C extends Securable>
- All Superinterfaces:
BaseReadOnlyService<C>
- All Known Subinterfaces:
ArrayDesignService, BioAssayService, BioMaterialService, DifferentialExpressionAnalysisService, ExperimentalDesignService, ExperimentalFactorService, ExpressionExperimentService, ExpressionExperimentSetService, FactorValueService, GeneDiffExMetaAnalysisService, GeneSetService, ProtocolService, SecurableBaseImmutableService<C>, SecurableBaseService<C>, SecurableBaseVoEnabledService<C,VO>, SecurableFilteringVoEnabledService<C, VO>
- All Known Implementing Classes:
ArrayDesignServiceImpl, BioAssayServiceImpl, BioMaterialServiceImpl, DifferentialExpressionAnalysisServiceImpl, ExperimentalDesignServiceImpl, ExperimentalFactorServiceImpl, ExpressionExperimentServiceImpl, ExpressionExperimentSetServiceImpl, FactorValueServiceImpl, GeneDiffExMetaAnalysisServiceImpl, GeneSetServiceImpl, ProtocolServiceImpl
-
Method Summary
Modifier and TypeMethodDescriptionfindOrFail(C entity) Does a search for the entity in the persistent storage, raising aNullPointerExceptionif not found.load(Collection<Long> ids) loadAll()loadOrFail(Long id) Load an entity of fail with aNullPointerExceptionif it does not exist in the persistent storage.loadOrFail(Long id, Function<String, T> exceptionSupplier) Load an entity or fail with the supplied exception if it does not exist in the persistent storage.loadOrFail(Long id, Function<String, T> exceptionSupplier, String message) Load an entity or fail with the supplied exception and message.loadOrFail(Long id, Supplier<T> exceptionSupplier) Load an entity or fail with the supplied exception if it does not exist in the persistent storage.streamAll(boolean createNewSession) Methods inherited from interface BaseReadOnlyService
countAll, getElementClass, loadOrFail, loadOrFail
-
Method Details
-
find
-
findOrFail
@NonNull @Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostAuthorize("returnObject == null or hasPermission(returnObject, 'READ') or hasPermission(returnObject, 'ADMINISTRATION')") C findOrFail(C entity) throws NullPointerException Description copied from interface:BaseReadOnlyServiceDoes a search for the entity in the persistent storage, raising aNullPointerExceptionif not found.- Specified by:
findOrFailin interfaceBaseReadOnlyService<C extends Securable>- Parameters:
entity- the entity to be searched for- Returns:
- the version of entity retrieved from persistent storage
- Throws:
NullPointerException- if the entity is not found
-
load
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostFilter("hasPermission(filterObject, 'READ') or hasPermission(filterObject, 'ADMINISTRATION')") Collection<C> load(Collection<Long> ids) - Specified by:
loadin interfaceBaseReadOnlyService<C extends Securable>- See Also:
-
load
-
loadOrFail
@NonNull @Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostAuthorize("returnObject == null or hasPermission(returnObject, 'READ') or hasPermission(returnObject, 'ADMINISTRATION')") C loadOrFail(Long id) throws NullPointerException Description copied from interface:BaseReadOnlyServiceLoad an entity of fail with aNullPointerExceptionif it does not exist in the persistent storage.- Specified by:
loadOrFailin interfaceBaseReadOnlyService<C extends Securable>- Parameters:
id- the ID used to retrieve the entity- Returns:
- the entity as per
BaseReadOnlyService.load(Long), never null - Throws:
NullPointerException- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
@NonNull @Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostAuthorize("returnObject == null or hasPermission(returnObject, 'READ') or hasPermission(returnObject, 'ADMINISTRATION')") <T extends Exception> C loadOrFail(Long id, Supplier<T> exceptionSupplier) throws T Description copied from interface:BaseReadOnlyServiceLoad an entity or fail with the supplied exception if it does not exist in the persistent storage.- Specified by:
loadOrFailin interfaceBaseReadOnlyService<C extends Securable>- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
@NonNull @Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostAuthorize("returnObject == null or hasPermission(returnObject, 'READ') or hasPermission(returnObject, 'ADMINISTRATION')") <T extends Exception> C loadOrFail(Long id, Function<String, T> exceptionSupplier) throws TDescription copied from interface:BaseReadOnlyServiceLoad an entity or fail with the supplied exception if it does not exist in the persistent storage.The message is generated automatically.
- Specified by:
loadOrFailin interfaceBaseReadOnlyService<C extends Securable>- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
@NonNull @Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostAuthorize("returnObject == null or hasPermission(returnObject, 'READ') or hasPermission(returnObject, 'ADMINISTRATION')") <T extends Exception> C loadOrFail(Long id, Function<String, T> exceptionSupplier, String message) throws TDescription copied from interface:BaseReadOnlyServiceLoad an entity or fail with the supplied exception and message.- Specified by:
loadOrFailin interfaceBaseReadOnlyService<C extends Securable>- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadAll
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") @PostFilter("hasPermission(filterObject, 'READ') or hasPermission(filterObject, 'ADMINISTRATION')") Collection<C> loadAll()- Specified by:
loadAllin interfaceBaseReadOnlyService<C extends Securable>- See Also:
-
streamAll
-
streamAll
-