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_MSFields 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 BioMaterialValueObjectdoLoadValueObject(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.voidremove(BioMaterial entity) Remove a persistent instancesave(BioMaterial entity) Create or update an entity whether it is transient.voidupdate(BioMaterial entity) Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds, postProcessValueObjectsMethods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, streamAll, streamAll, streamQuery, 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.BaseDao
countAll, create, findOrCreate, getElementClass, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, streamAll, streamAll, updateMethods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Constructor Details
-
BioMaterialDaoImpl
-
-
Method Details
-
create
Description copied from interface:BaseDaoCreate an object. If the entity type is immutable, this may also remove any existing entities identified by an appropriate 'find' method.- Specified by:
createin interfaceBaseDao<BioMaterial>- Overrides:
createin classAbstractDao<BioMaterial>- Parameters:
entity- the entity to create- Returns:
- the persistent version of the entity
-
save
Description copied from interface:BaseDaoCreate or update an entity whether it is transient.Unlike
BaseDao.update(Identifiable), this method does not attach the given entity to the persistence context and the returned value must be used instead.- Specified by:
savein interfaceBaseDao<BioMaterial>- Overrides:
savein classAbstractDao<BioMaterial>- See Also:
-
update
- Specified by:
updatein interfaceBaseDao<BioMaterial>- Overrides:
updatein classAbstractDao<BioMaterial>- Parameters:
entity- Update the entity. Not supported if the entity is immutable.
-
find
Description copied from interface:BaseDaoDoes 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:
findin interfaceBaseDao<BioMaterial>- Overrides:
findin 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:BioMaterialDaoFind all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial().- Specified by:
findSubBioMaterialsin interfaceBioMaterialDao- Parameters:
direct- if true, only direct sub-biomaterials are retained, otherwise the entire hierarchy is visited recursively.
-
findSubBioMaterials
Description copied from interface:BioMaterialDaoFind all the sub-biomaterials for a given biomaterial related byBioMaterial.getSourceBioMaterial().- Specified by:
findSubBioMaterialsin 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:
copyin interfaceBioMaterialDao
-
findByExperiment
- Specified by:
findByExperimentin interfaceBioMaterialDao
-
findByFactor
- Specified by:
findByFactorin interfaceBioMaterialDao
-
getExpressionExperiments
Description copied from interface:BioMaterialDaoObtain 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:
getExpressionExperimentsin interfaceBioMaterialDao
-
doLoadValueObject
Description copied from class:AbstractVoEnabledDaoLoad 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:
doLoadValueObjectin classAbstractVoEnabledDao<BioMaterial,BioMaterialValueObject>
-
remove
Description copied from interface:BaseDaoRemove a persistent instance- Specified by:
removein interfaceBaseDao<BioMaterial>- Overrides:
removein classAbstractDao<BioMaterial>- Parameters:
entity- the entity to be removed
-