Interface BioMaterialService
-
- All Superinterfaces:
BaseImmutableService<BioMaterial>
,BaseReadOnlyService<BioMaterial>
,BaseService<BioMaterial>
,BaseVoEnabledService<BioMaterial,BioMaterialValueObject>
- All Known Implementing Classes:
BioMaterialServiceImpl
public interface BioMaterialService extends BaseService<BioMaterial>, BaseVoEnabledService<BioMaterial,BioMaterialValueObject>
- Author:
- kelsey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCharacteristic(BioMaterial bm, Characteristic vc)
Will persist the give vocab characteristic to the given biomaterial<T> void
associateBatchFactor(Map<BioMaterial,T> descriptors, Map<T,FactorValue> d2fv)
Associate dates with bioassays and any new factors with the biomaterials.BioMaterial
copy(BioMaterial bioMaterial)
Copies a bioMaterial.BioMaterial
create(BioMaterial bioMaterial)
Creates the given entity in the persistent storage.Collection<BioMaterial>
findByExperiment(ExpressionExperiment experiment)
BioMaterial
findOrCreate(BioMaterial bioMaterial)
Does a search for the entity in the persistent storage, and if not found, creates it.String
getBioMaterialIdList(Collection<BioMaterial> bioMaterials)
ExpressionExperiment
getExpressionExperiment(Long id)
BioMaterial
load(Long id)
Loads object with given ID.Collection<BioMaterial>
load(Collection<Long> ids)
Loads objects with given ids.Collection<BioMaterial>
loadAll()
Loads all the entities of specific type.void
remove(BioMaterial bioMaterial)
Removes the given entity from the persistent storage.void
removeCharacteristic(BioMaterial bm, Characteristic vc)
Remove the given characteristic from the given biomaterialCollection<BioMaterial>
thaw(Collection<BioMaterial> bioMaterials)
BioMaterial
thaw(BioMaterial bioMaterial)
void
update(BioMaterial bioMaterial)
Updates the given entity in the persistent storage.Collection<BioMaterial>
updateBioMaterials(Collection<BioMaterialValueObject> valueObjects)
Update the biomaterials that are described by the given valueObjects.-
Methods inherited from interface ubic.gemma.persistence.service.BaseImmutableService
create, remove, remove
-
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, loadOrFail, loadOrFail, loadOrFail, loadOrFail
-
Methods inherited from interface ubic.gemma.persistence.service.BaseService
save, save, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
-
-
-
Method Detail
-
copy
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) BioMaterial copy(BioMaterial bioMaterial)
Copies a bioMaterial.- Parameters:
bioMaterial
- ba to copy- Returns:
- the copy
-
findByExperiment
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE__READ"}) Collection<BioMaterial> findByExperiment(ExpressionExperiment experiment)
-
findOrCreate
@Secured({"GROUP_USER","AFTER_ACL_READ"}) BioMaterial findOrCreate(BioMaterial bioMaterial)
Description copied from interface:BaseImmutableService
Does a search for the entity in the persistent storage, and if not found, creates it.- Specified by:
findOrCreate
in interfaceBaseImmutableService<BioMaterial>
- Parameters:
bioMaterial
- the entity to look for, and create if not found.- Returns:
- the entity retrieved from the persistent storage, either found or created.
-
create
@Secured("GROUP_USER") BioMaterial create(BioMaterial bioMaterial)
Description copied from interface:BaseImmutableService
Creates the given entity in the persistent storage.- Specified by:
create
in interfaceBaseImmutableService<BioMaterial>
- Parameters:
bioMaterial
- the entity to be created.- Returns:
- object referencing the persistent instance of the given entity.
-
load
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","AFTER_ACL_COLLECTION_READ"}) Collection<BioMaterial> load(Collection<Long> ids)
Description copied from interface:BaseReadOnlyService
Loads objects with given ids.- Specified by:
load
in interfaceBaseReadOnlyService<BioMaterial>
- Parameters:
ids
- the ids of objects to be loaded.- Returns:
- collection containing object with given IDs.
-
load
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","AFTER_ACL_READ"}) BioMaterial load(Long id)
Description copied from interface:BaseReadOnlyService
Loads object with given ID.- Specified by:
load
in interfaceBaseReadOnlyService<BioMaterial>
- 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
-
loadAll
@Secured({"GROUP_USER","AFTER_ACL_COLLECTION_READ"}) Collection<BioMaterial> loadAll()
Description copied from interface:BaseReadOnlyService
Loads all the entities of specific type.- Specified by:
loadAll
in interfaceBaseReadOnlyService<BioMaterial>
- Returns:
- collection of all entities currently available in the persistent storage.
-
remove
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void remove(BioMaterial bioMaterial)
Description copied from interface:BaseImmutableService
Removes the given entity from the persistent storage.- Specified by:
remove
in interfaceBaseImmutableService<BioMaterial>
- Parameters:
bioMaterial
- the entity to be removed.
-
update
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void update(BioMaterial bioMaterial)
Description copied from interface:BaseService
Updates the given entity in the persistent storage.- Specified by:
update
in interfaceBaseService<BioMaterial>
- Parameters:
bioMaterial
- the entity to be updated.
-
getExpressionExperiment
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","AFTER_ACL_READ"}) ExpressionExperiment getExpressionExperiment(Long id)
-
thaw
@CheckReturnValue @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE__READ"}) BioMaterial thaw(BioMaterial bioMaterial)
-
thaw
@CheckReturnValue @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","AFTER_ACL_COLLECTION_READ"}) Collection<BioMaterial> thaw(Collection<BioMaterial> bioMaterials)
-
updateBioMaterials
@Secured("GROUP_USER") Collection<BioMaterial> updateBioMaterials(Collection<BioMaterialValueObject> valueObjects)
Update the biomaterials that are described by the given valueObjects. This is used to update experimental designs in particular.- Parameters:
valueObjects
- VOs- Returns:
- the biomaterials that were modified.
-
associateBatchFactor
@Secured("GROUP_ADMIN") <T> void associateBatchFactor(Map<BioMaterial,T> descriptors, Map<T,FactorValue> d2fv)
Associate dates with bioassays and any new factors with the biomaterials. Note we can have missing values.- Parameters:
d2fv
- map of dates to factor values
-
getBioMaterialIdList
String getBioMaterialIdList(Collection<BioMaterial> bioMaterials)
-
addCharacteristic
void addCharacteristic(BioMaterial bm, Characteristic vc)
Will persist the give vocab characteristic to the given biomaterial
-
removeCharacteristic
void removeCharacteristic(BioMaterial bm, Characteristic vc)
Remove the given characteristic from the given biomaterial- Throws:
IllegalArgumentException
- if the characteristic does not belong to the biomaterial
-
-