Class BioMaterialServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractService<O>
-
- 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>
,BioMaterialService
@Service public class BioMaterialServiceImpl extends AbstractVoEnabledService<BioMaterial,BioMaterialValueObject> implements BioMaterialService
- Author:
- pavlidis, keshav
- See Also:
BioMaterialService
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
-
Constructor Summary
Constructors Constructor Description BioMaterialServiceImpl(BioMaterialDao bioMaterialDao, FactorValueDao factorValueDao, BioAssayDao bioAssayDao, ExperimentalFactorDao experimentalFactorDao)
-
Method Summary
All Methods Instance Methods Concrete 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.Collection<BioMaterial>
findByExperiment(ExpressionExperiment experiment)
String
getBioMaterialIdList(Collection<BioMaterial> bioMaterials)
ExpressionExperiment
getExpressionExperiment(Long id)
void
removeCharacteristic(BioMaterial bm, Characteristic characterId)
Remove the given characteristic from the given biomaterialCollection<BioMaterial>
thaw(Collection<BioMaterial> bioMaterials)
BioMaterial
thaw(BioMaterial bioMaterial)
Collection<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, loadValueObjectsByIds
-
Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
Methods inherited from interface ubic.gemma.persistence.service.expression.biomaterial.BioMaterialService
create, findOrCreate, load, load, loadAll, remove, update
-
-
-
-
Constructor Detail
-
BioMaterialServiceImpl
@Autowired public BioMaterialServiceImpl(BioMaterialDao bioMaterialDao, FactorValueDao factorValueDao, BioAssayDao bioAssayDao, ExperimentalFactorDao experimentalFactorDao)
-
-
Method Detail
-
copy
@Transactional(readOnly=true) public BioMaterial copy(BioMaterial bioMaterial)
Description copied from interface:BioMaterialService
Copies a bioMaterial.- Specified by:
copy
in interfaceBioMaterialService
- Parameters:
bioMaterial
- ba to copy- Returns:
- the copy
-
findByExperiment
@Transactional(readOnly=true) public Collection<BioMaterial> findByExperiment(ExpressionExperiment experiment)
- Specified by:
findByExperiment
in interfaceBioMaterialService
-
getExpressionExperiment
@Transactional(readOnly=true) public ExpressionExperiment getExpressionExperiment(Long id)
- Specified by:
getExpressionExperiment
in interfaceBioMaterialService
-
thaw
@Transactional(readOnly=true) public BioMaterial thaw(BioMaterial bioMaterial)
- Specified by:
thaw
in interfaceBioMaterialService
-
thaw
@Transactional(readOnly=true) public Collection<BioMaterial> thaw(Collection<BioMaterial> bioMaterials)
- Specified by:
thaw
in interfaceBioMaterialService
-
updateBioMaterials
@Transactional public Collection<BioMaterial> updateBioMaterials(Collection<BioMaterialValueObject> valueObjects)
Description copied from interface:BioMaterialService
Update the biomaterials that are described by the given valueObjects. This is used to update experimental designs in particular.- Specified by:
updateBioMaterials
in 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:BioMaterialService
Associate dates with bioassays and any new factors with the biomaterials. Note we can have missing values.- Specified by:
associateBatchFactor
in interfaceBioMaterialService
d2fv
- map of dates to factor values
-
getBioMaterialIdList
public String getBioMaterialIdList(Collection<BioMaterial> bioMaterials)
- Specified by:
getBioMaterialIdList
in interfaceBioMaterialService
-
addCharacteristic
@Transactional public void addCharacteristic(BioMaterial bm, Characteristic vc)
Description copied from interface:BioMaterialService
Will persist the give vocab characteristic to the given biomaterial- Specified by:
addCharacteristic
in interfaceBioMaterialService
- See Also:
ExpressionExperimentService.addCharacteristic(ExpressionExperiment, Characteristic)
-
removeCharacteristic
public void removeCharacteristic(BioMaterial bm, Characteristic characterId)
Description copied from interface:BioMaterialService
Remove the given characteristic from the given biomaterial- Specified by:
removeCharacteristic
in interfaceBioMaterialService
-
-