Class BioAssaySetServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.expression.experiment.BioAssaySetServiceImpl
-
- All Implemented Interfaces:
BaseReadOnlyService<BioAssaySet>
,BioAssaySetService
@Service public class BioAssaySetServiceImpl extends Object implements BioAssaySetService
-
-
Constructor Summary
Constructors Constructor Description BioAssaySetServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countAll()
BioAssaySet
find(BioAssaySet entity)
Does a search for the entity in the persistent storageBioAssaySet
findOrFail(BioAssaySet entity)
Does a search for the entity in the persistent storage, raising aNullPointerException
if not found.Class<? extends BioAssaySet>
getElementClass()
BioAssaySet
load(Long id)
Loads object with given ID.Collection<BioAssaySet>
load(Collection<Long> ids)
Loads objects with given ids.Collection<BioAssaySet>
loadAll()
Loads all the entities of specific type.BioAssaySet
loadOrFail(Long id)
Convenience for runningBaseReadOnlyService.load(Long)
and checking if the result is null.<T extends Exception>
BioAssaySetloadOrFail(Long id, Function<String,T> exceptionSupplier)
Load an entity or fail with the supplied exception; the message is generated automatically.<T extends Exception>
BioAssaySetloadOrFail(Long id, Function<String,T> exceptionSupplier, String message)
Load an entity or fail with the supplied exception and message.<T extends Exception>
BioAssaySetloadOrFail(Long id, Supplier<T> exceptionSupplier)
Load an entity or fail with the supplied exception.void
remove(Collection<? extends BioAssaySet> entities)
void
remove(BioAssaySet entity)
-
-
-
Method Detail
-
getElementClass
public Class<? extends BioAssaySet> getElementClass()
- Specified by:
getElementClass
in interfaceBaseReadOnlyService<BioAssaySet>
-
find
@Nullable @Transactional(readOnly=true) public BioAssaySet find(BioAssaySet entity)
Description copied from interface:BaseReadOnlyService
Does a search for the entity in the persistent storage- Specified by:
find
in interfaceBaseReadOnlyService<BioAssaySet>
- Parameters:
entity
- the entity to be searched for- Returns:
- the version of entity retrieved from the persistent storage, if found, otherwise null.
-
findOrFail
@Nonnull @Transactional(readOnly=true) public BioAssaySet findOrFail(BioAssaySet entity)
Description copied from interface:BaseReadOnlyService
Does a search for the entity in the persistent storage, raising aNullPointerException
if not found.- Specified by:
findOrFail
in interfaceBaseReadOnlyService<BioAssaySet>
- Parameters:
entity
- the entity to be searched for- Returns:
- the version of entity retrieved from persistent storage
-
load
public Collection<BioAssaySet> load(Collection<Long> ids)
Description copied from interface:BaseReadOnlyService
Loads objects with given ids.- Specified by:
load
in interfaceBaseReadOnlyService<BioAssaySet>
- Parameters:
ids
- the ids of objects to be loaded.- Returns:
- collection containing object with given IDs.
-
load
@Nullable public BioAssaySet load(Long id)
Description copied from interface:BaseReadOnlyService
Loads object with given ID.- Specified by:
load
in interfaceBaseReadOnlyService<BioAssaySet>
- Parameters:
id
- the ID of entity to be loaded.- Returns:
- the entity with matching ID, or null if the entity does not exist or if the passed ID was null
-
loadOrFail
@Nonnull public BioAssaySet loadOrFail(Long id) throws NullPointerException
Description copied from interface:BaseReadOnlyService
Convenience for runningBaseReadOnlyService.load(Long)
and checking if the result is null.- Specified by:
loadOrFail
in interfaceBaseReadOnlyService<BioAssaySet>
- 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
-
loadOrFail
@Nonnull public <T extends Exception> BioAssaySet loadOrFail(Long id, Supplier<T> exceptionSupplier) throws T extends Exception
Description copied from interface:BaseReadOnlyService
Load an entity or fail with the supplied exception.- Specified by:
loadOrFail
in interfaceBaseReadOnlyService<BioAssaySet>
- Throws:
T
- if the entity does not exist in the persistent storageT extends Exception
-
loadOrFail
@Nonnull public <T extends Exception> BioAssaySet loadOrFail(Long id, Function<String,T> exceptionSupplier) throws T extends Exception
Description copied from interface:BaseReadOnlyService
Load an entity or fail with the supplied exception; the message is generated automatically.- Specified by:
loadOrFail
in interfaceBaseReadOnlyService<BioAssaySet>
- Throws:
T
- if the entity does not exist in the persistent storageT extends Exception
-
loadOrFail
@Nonnull public <T extends Exception> BioAssaySet loadOrFail(Long id, Function<String,T> exceptionSupplier, String message) throws T extends Exception
Description copied from interface:BaseReadOnlyService
Load an entity or fail with the supplied exception and message.- Specified by:
loadOrFail
in interfaceBaseReadOnlyService<BioAssaySet>
- Throws:
T
- if the entity does not exist in the persistent storageT extends Exception
-
loadAll
@Transactional(readOnly=true) public Collection<BioAssaySet> loadAll()
Description copied from interface:BaseReadOnlyService
Loads all the entities of specific type.- Specified by:
loadAll
in interfaceBaseReadOnlyService<BioAssaySet>
- Returns:
- collection of all entities currently available in the persistent storage.
-
countAll
@Transactional(readOnly=true) public long countAll()
- Specified by:
countAll
in interfaceBaseReadOnlyService<BioAssaySet>
-
remove
@Transactional public void remove(Collection<? extends BioAssaySet> entities)
- Specified by:
remove
in interfaceBioAssaySetService
-
remove
@Transactional public void remove(BioAssaySet entity)
- Specified by:
remove
in interfaceBioAssaySetService
-
-