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
Modifier and TypeMethodDescriptionvoidWill persist the give vocab characteristic to the given biomaterial<T> voidassociateBatchFactor(Map<BioMaterial, T> descriptors, Map<T, FactorValue> d2fv) Associate dates with bioassays and any new factors with the biomaterials.copy(BioMaterial bioMaterial) Copies a bioMaterial.create(BioMaterial bioMaterial) Creates the given entity in the persistent storage.findByExperiment(ExpressionExperiment experiment) findByFactor(ExperimentalFactor experimentalFactor) findOrCreate(BioMaterial bioMaterial) Does a search for the entity in the persistent storage, and if not found, creates it.findSiblings(BioMaterial bioMaterial) Find the siblings of a given biomaterial.findSubBioMaterials(BioMaterial bioMaterial, boolean direct) getBioMaterialIdList(Collection<BioMaterial> bioMaterials) Loads object with given ID.load(Collection<Long> ids) Loads objects with given ids.loadAll()Loads all the entities of specific type.voidremove(BioMaterial bioMaterial) Removes the given entity from the persistent storage.voidRemove the given characteristic from the given biomaterialthaw(Collection<BioMaterial> bioMaterials) thaw(BioMaterial bioMaterial) voidupdate(BioMaterial bioMaterial) Updates the given entity in the persistent storage.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, removeMethods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAllMethods inherited from interface ubic.gemma.persistence.service.BaseService
save, save, updateMethods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Method Details
-
copy
Copies a bioMaterial.- Parameters:
bioMaterial- ba to copy- Returns:
- the copy
-
findSubBioMaterials
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<BioMaterial> findSubBioMaterials(BioMaterial bioMaterial, boolean direct) - See Also:
-
findSiblings
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<BioMaterial> findSiblings(BioMaterial bioMaterial) Find the siblings of a given biomaterial. -
findByExperiment
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<BioMaterial> findByExperiment(ExpressionExperiment experiment) -
findByFactor
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<BioMaterial> findByFactor(ExperimentalFactor experimentalFactor) -
findOrCreate
Description copied from interface:BaseImmutableServiceDoes a search for the entity in the persistent storage, and if not found, creates it.- Specified by:
findOrCreatein 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
Description copied from interface:BaseImmutableServiceCreates the given entity in the persistent storage.- Specified by:
createin 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:BaseReadOnlyServiceLoads objects with given ids.- Specified by:
loadin interfaceBaseReadOnlyService<BioMaterial>- Parameters:
ids- the ids of objects to be loaded.- Returns:
- collection containing object with given IDs.
-
load
Description copied from interface:BaseReadOnlyServiceLoads object with given ID.- Specified by:
loadin 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
Description copied from interface:BaseReadOnlyServiceLoads all the entities of specific type.- Specified by:
loadAllin interfaceBaseReadOnlyService<BioMaterial>- Returns:
- collection of all entities currently available in the persistent storage.
-
remove
Description copied from interface:BaseImmutableServiceRemoves the given entity from the persistent storage.- Specified by:
removein interfaceBaseImmutableService<BioMaterial>- Parameters:
bioMaterial- the entity to be removed.
-
update
Description copied from interface:BaseServiceUpdates the given entity in the persistent storage.- Specified by:
updatein interfaceBaseService<BioMaterial>- Parameters:
bioMaterial- the entity to be updated.
-
getExpressionExperiments
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","AFTER_ACL_MAP_READ"}) Map<BioMaterial,Map<BioAssay, getExpressionExperimentsExpressionExperiment>> (BioMaterial bm) -
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
-
addCharacteristic
Will persist the give vocab characteristic to the given biomaterial- See Also:
-
removeCharacteristic
Remove the given characteristic from the given biomaterial- Throws:
IllegalArgumentException- if the characteristic does not belong to the biomaterial
-