Class BioMaterialDaoImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractDao<BioMaterial>
ubic.gemma.persistence.service.AbstractVoEnabledDao<BioMaterial,BioMaterialValueObject>
ubic.gemma.persistence.service.expression.biomaterial.BioMaterialDaoImpl
- All Implemented Interfaces:
BaseDao<BioMaterial>
,BaseVoEnabledDao<BioMaterial,
,BioMaterialValueObject> BioMaterialDao
@Repository
public class BioMaterialDaoImpl
extends AbstractVoEnabledDao<BioMaterial,BioMaterialValueObject>
implements BioMaterialDao
- Author:
- pavlidis
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy
(BioMaterial bioMaterial) create
(BioMaterial entity) Create an object.protected BioMaterialValueObject
doLoadValueObject
(BioMaterial entity) Load a value object for a given entity.find
(BioMaterial bioMaterial) Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).findByExperiment
(ExpressionExperiment experiment) findByFactor
(ExperimentalFactor experimentalFactor) findSubBioMaterials
(Collection<BioMaterial> bioMaterials, boolean direct) Find all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial()
.findSubBioMaterials
(BioMaterial bioMaterial, boolean direct) Find all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial()
.Obtain all the experiments a biomaterial is used in from its hierarchy.void
remove
(BioMaterial entity) Remove a persistent instancesave
(BioMaterial entity) Create or update an entity whether it is transient.void
update
(BioMaterial entity) Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds, postProcessValueObjects
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, streamAll, streamAll, streamQuery, 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.BaseDao
countAll, create, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, streamAll, streamAll, update
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Constructor Details
-
BioMaterialDaoImpl
-
-
Method Details
-
create
Description copied from interface:BaseDao
Create an object. If the entity type is immutable, this may also remove any existing entities identified by an appropriate 'find' method.- Specified by:
create
in interfaceBaseDao<BioMaterial>
- Overrides:
create
in classAbstractDao<BioMaterial>
- Parameters:
entity
- the entity to create- Returns:
- the persistent version of the entity
-
save
Description copied from interface:BaseDao
Create or update an entity whether it is transient.Unlike
BaseDao.update(Object)
, this method does not attach the given entity to the persistence context and the returned value must be used instead.- Specified by:
save
in interfaceBaseDao<BioMaterial>
- Overrides:
save
in classAbstractDao<BioMaterial>
- See Also:
-
update
- Specified by:
update
in interfaceBaseDao<BioMaterial>
- Overrides:
update
in classAbstractDao<BioMaterial>
- Parameters:
entity
- Update the entity. Not supported if the entity is immutable.
-
find
Description copied from interface:BaseDao
Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).- Specified by:
find
in interfaceBaseDao<BioMaterial>
- Overrides:
find
in classAbstractDao<BioMaterial>
- Parameters:
bioMaterial
- the entity to look for.- Returns:
- an entity that was found in the persistent storage, or null if no such entity was found.
-
findSubBioMaterials
Description copied from interface:BioMaterialDao
Find all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial()
.- Specified by:
findSubBioMaterials
in interfaceBioMaterialDao
- Parameters:
direct
- if true, only direct sub-biomaterials are retained, otherwise the entire hierarchy is visited recursively.
-
findSubBioMaterials
Description copied from interface:BioMaterialDao
Find all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial()
.- Specified by:
findSubBioMaterials
in interfaceBioMaterialDao
- Parameters:
bioMaterials
- a collection of biomaterials to visitdirect
- if true, only direct sub-biomaterials are retained, otherwise the entire hierarchy is visited recursively.
-
copy
- Specified by:
copy
in interfaceBioMaterialDao
-
findByExperiment
- Specified by:
findByExperiment
in interfaceBioMaterialDao
-
findByFactor
- Specified by:
findByFactor
in interfaceBioMaterialDao
-
getExpressionExperiments
Description copied from interface:BioMaterialDao
Obtain all the experiments a biomaterial is used in from its hierarchy.This also includes experiments that are using this via one of their parent?
- Specified by:
getExpressionExperiments
in interfaceBioMaterialDao
-
doLoadValueObject
Description copied from class:AbstractVoEnabledDao
Load a value object for a given entity.This should be fast and efficient, and avoid any database query or post-processing. If you need to perform additional queries, implement
AbstractVoEnabledDao.postProcessValueObjects(List)
instead.- Specified by:
doLoadValueObject
in classAbstractVoEnabledDao<BioMaterial,
BioMaterialValueObject>
-
remove
Description copied from interface:BaseDao
Remove a persistent instance- Specified by:
remove
in interfaceBaseDao<BioMaterial>
- Overrides:
remove
in classAbstractDao<BioMaterial>
- Parameters:
entity
- the entity to be removed
-