Class BioMaterialServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<BioMaterial>
ubic.gemma.persistence.service.AbstractVoEnabledService<BioMaterial,BioMaterialValueObject>
ubic.gemma.persistence.service.expression.biomaterial.BioMaterialServiceImpl
- All Implemented Interfaces:
BaseImmutableService<BioMaterial>,BaseReadOnlyService<BioMaterial>,BaseService<BioMaterial>,BaseVoEnabledService<BioMaterial,,BioMaterialValueObject> SecurableBaseImmutableService<BioMaterial>,SecurableBaseReadOnlyService<BioMaterial>,SecurableBaseService<BioMaterial>,SecurableBaseVoEnabledService<BioMaterial,,BioMaterialValueObject> BioMaterialService
@Service
public class BioMaterialServiceImpl
extends AbstractVoEnabledService<BioMaterial,BioMaterialValueObject>
implements BioMaterialService
- Author:
- pavlidis, keshav
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log -
Constructor Summary
ConstructorsConstructorDescriptionBioMaterialServiceImpl(BioMaterialDao bioMaterialDao, FactorValueDao factorValueDao, BioAssayDao bioAssayDao, ExperimentalFactorDao experimentalFactorDao, CharacteristicService characteristicService) -
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.findByExperiment(ExpressionExperiment experiment) findByFactor(ExperimentalFactor experimentalFactor) findSiblings(BioMaterial bioMaterial) Find the siblings of a given biomaterial.findSubBioMaterials(BioMaterial bioMaterial, boolean direct) <T extends Exception>
BioMaterialloadAndThawOrFail(Long bmId, Function<String, T> exceptionSupplier, String message) voidremoveCharacteristics(BioMaterial bm, Collection<Characteristic> characteristicsToRemove) Remove the given characteristic from the given biomaterialthaw(Collection<BioMaterial> bioMaterials) thaw(BioMaterial bioMaterial) updateBioMaterials(Collection<BioMaterialValueObject> valueObjects) Update the biomaterials that are described by the given valueObjects.Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, save, save, streamAll, streamAll, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, getElementClass, loadOrFail, loadOrFailMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseImmutableService
create, create, findOrCreate, remove, removeMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseReadOnlyService
find, findOrFail, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAllMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseService
save, save, update, updateMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Constructor Details
-
BioMaterialServiceImpl
@Autowired public BioMaterialServiceImpl(BioMaterialDao bioMaterialDao, FactorValueDao factorValueDao, BioAssayDao bioAssayDao, ExperimentalFactorDao experimentalFactorDao, CharacteristicService characteristicService)
-
-
Method Details
-
copy
Description copied from interface:BioMaterialServiceCopies a bioMaterial.- Specified by:
copyin interfaceBioMaterialService- Parameters:
bioMaterial- ba to copy- Returns:
- the copy
-
findSubBioMaterials
@Transactional(readOnly=true) public Collection<BioMaterial> findSubBioMaterials(BioMaterial bioMaterial, boolean direct) - Specified by:
findSubBioMaterialsin interfaceBioMaterialService- See Also:
-
findSiblings
Description copied from interface:BioMaterialServiceFind the siblings of a given biomaterial.- Specified by:
findSiblingsin interfaceBioMaterialService
-
findByExperiment
@Transactional(readOnly=true) public Collection<BioMaterial> findByExperiment(ExpressionExperiment experiment) - Specified by:
findByExperimentin interfaceBioMaterialService
-
findByFactor
@Transactional(readOnly=true) public Collection<BioMaterial> findByFactor(ExperimentalFactor experimentalFactor) - Specified by:
findByFactorin interfaceBioMaterialService
-
loadAndThawOrFail
@Transactional(readOnly=true) public <T extends Exception> BioMaterial loadAndThawOrFail(Long bmId, Function<String, T> exceptionSupplier, String message) throws T- Specified by:
loadAndThawOrFailin interfaceBioMaterialService- Throws:
T
-
getExpressionExperiments
@Transactional(readOnly=true) public Map<BioMaterial,Map<BioAssay, getExpressionExperimentsExpressionExperiment>> (BioMaterial bm) - Specified by:
getExpressionExperimentsin interfaceBioMaterialService
-
thaw
- Specified by:
thawin interfaceBioMaterialService
-
thaw
@Transactional(readOnly=true) public Collection<BioMaterial> thaw(Collection<BioMaterial> bioMaterials) - Specified by:
thawin interfaceBioMaterialService
-
updateBioMaterials
@Transactional public Collection<BioMaterial> updateBioMaterials(Collection<BioMaterialValueObject> valueObjects) Description copied from interface:BioMaterialServiceUpdate the biomaterials that are described by the given valueObjects. This is used to update experimental designs in particular.- Specified by:
updateBioMaterialsin interfaceBioMaterialService- Parameters:
valueObjects- VOs- Returns:
- the biomaterials that were modified.
-
associateBatchFactor
@Transactional public <T> void associateBatchFactor(Map<BioMaterial, T> descriptors, Map<T, FactorValue> d2fv) Description copied from interface:BioMaterialServiceAssociate dates with bioassays and any new factors with the biomaterials. Note we can have missing values.- Specified by:
associateBatchFactorin interfaceBioMaterialService- Parameters:
d2fv- map of dates to factor values
-
addCharacteristic
Description copied from interface:BioMaterialServiceWill persist the give vocab characteristic to the given biomaterial- Specified by:
addCharacteristicin interfaceBioMaterialService- See Also:
-
removeCharacteristics
@Transactional public void removeCharacteristics(BioMaterial bm, Collection<Characteristic> characteristicsToRemove) Description copied from interface:BioMaterialServiceRemove the given characteristic from the given biomaterial- Specified by:
removeCharacteristicsin interfaceBioMaterialService
-