Package ubic.gemma.persistence.service
Interface BaseReadOnlyService<O extends Identifiable>
- All Known Subinterfaces:
AdminEditableBaseImmutableService<O>,AdminEditableBaseService<O>,AnalysisResultSetService<K,,O> AnalysisService<T>,AnnotationAssociationService,ArrayDesignService,AuditTrailService,BaseImmutableService<O>,BaseService<O>,BaseVoEnabledService<O,,VO> BibliographicReferenceService,BioAssayDimensionService,BioAssayService,BioMaterialService,BioSequenceService,BlacklistedEntityService,BlatAssociationService,BlatResultService,BulkExpressionDataVectorService<T>,CharacteristicService,ChromosomeService,CoexpressionAnalysisService,CompositeSequenceService,CompoundService,DatabaseEntryService,DifferentialExpressionAnalysisService,DifferentialExpressionResultService,ExperimentalDesignService,ExperimentalFactorService,ExpressionAnalysisResultSetService,ExpressionExperimentService,ExpressionExperimentSetService,ExpressionExperimentSubSetService,ExternalDatabaseService,FactorValueService,FilteringService<O>,FilteringVoEnabledService<O,,VO> GeeqService,Gene2GOAssociationService,GeneDiffExMetaAnalysisService,GeneProductService,GeneService,GeneSetService,PrincipalComponentAnalysisService,ProcessedExpressionDataVectorService,ProtocolService,QuantitationTypeService,RawAndProcessedExpressionDataVectorService,RawExpressionDataVectorService,SecurableBaseImmutableService<C>,SecurableBaseReadOnlyService<C>,SecurableBaseService<C>,SecurableBaseVoEnabledService<C,,VO> SecurableFilteringVoEnabledService<C,,VO> TaxonService
- All Known Implementing Classes:
AbstractBulkExpressionDataVectorService,AbstractFilteringVoEnabledService,AbstractService,AbstractVoEnabledService,AnnotationAssociationServiceImpl,ArrayDesignServiceImpl,AuditTrailServiceImpl,BibliographicReferenceServiceImpl,BioAssayDimensionServiceImpl,BioAssayServiceImpl,BioMaterialServiceImpl,BioSequenceServiceImpl,BlacklistedEntityServiceImpl,BlatAssociationServiceImpl,BlatResultServiceImpl,CharacteristicServiceImpl,ChromosomeServiceImpl,CoexpressionAnalysisServiceImpl,CompositeSequenceServiceImpl,CompoundServiceImpl,DatabaseEntryServiceImpl,DifferentialExpressionAnalysisServiceImpl,DifferentialExpressionResultServiceImpl,ExperimentalDesignServiceImpl,ExperimentalFactorServiceImpl,ExpressionAnalysisResultSetServiceImpl,ExpressionExperimentServiceImpl,ExpressionExperimentSetServiceImpl,ExpressionExperimentSubSetServiceImpl,ExternalDatabaseServiceImpl,FactorValueServiceImpl,GeeqServiceImpl,Gene2GOAssociationServiceImpl,GeneDiffExMetaAnalysisServiceImpl,GeneProductServiceImpl,GeneServiceImpl,GeneSetServiceImpl,PrincipalComponentAnalysisServiceImpl,ProcessedExpressionDataVectorServiceImpl,ProtocolServiceImpl,QuantitationTypeServiceImpl,RawAndProcessedExpressionDataVectorServiceImpl,RawExpressionDataVectorServiceImpl,TaxonServiceImpl
public interface BaseReadOnlyService<O extends Identifiable>
Interface for read-only services.
- Author:
- poirigui
-
Method Summary
Modifier and TypeMethodDescriptionlongcountAll()findOrFail(O 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.loadOrFail(Collection<Long> ids) Load multiple objects or fail with aNullPointerExceptionif any of the objects does not exist in the persistent storage.<T extends Exception>
Collection<O> loadOrFail(Collection<Long> ids, Function<String, T> exceptionSupplier) streamAll(boolean createNewSession)
-
Method Details
-
getElementClass
- See Also:
-
find
- See Also:
-
findOrFail
Does a search for the entity in the persistent storage, raising aNullPointerExceptionif not found.- 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
- See Also:
-
loadOrFail
Load multiple objects or fail with aNullPointerExceptionif any of the objects does not exist in the persistent storage.- Throws:
NullPointerException
-
loadOrFail
<T extends Exception> Collection<O> loadOrFail(Collection<Long> ids, Function<String, T> exceptionSupplier) throws T- Throws:
T
-
load
- See Also:
-
loadOrFail
Load an entity of fail with aNullPointerExceptionif it does not exist in the persistent storage.- Parameters:
id- the ID used to retrieve the entity- Returns:
- the entity as per
load(Long), never null - Throws:
NullPointerException- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
Load an entity or fail with the supplied exception if it does not exist in the persistent storage.- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
Load an entity or fail with the supplied exception if it does not exist in the persistent storage.The message is generated automatically.
- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadOrFail
@Nonnull <T extends Exception> O loadOrFail(Long id, Function<String, T> exceptionSupplier, String message) throws TLoad an entity or fail with the supplied exception and message.- Throws:
T- if the entity does not exist in the persistent storage- See Also:
-
loadAll
Collection<O> loadAll()- See Also:
-
countAll
long countAll()- See Also:
-
streamAll
- See Also:
-
streamAll
- See Also:
-