Class BioMaterialDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<O>
-
- 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:
BioMaterial
-
-
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
elementClass, log
-
-
Constructor Summary
Constructors Constructor Description BioMaterialDaoImpl(SessionFactory sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BioMaterial
copy(BioMaterial bioMaterial)
BioMaterial
create(BioMaterial entity)
Create an object.protected BioMaterialValueObject
doLoadValueObject(BioMaterial entity)
Load a value object for a given entity.BioMaterial
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).Collection<BioMaterial>
findByExperiment(ExpressionExperiment experiment)
ExpressionExperiment
getExpressionExperiment(Long bioMaterialId)
BioMaterial
save(BioMaterial entity)
Create or update an entity whether it is transient.void
thaw(BioMaterial bioMaterial)
Thaw the given BioMaterial.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, remove, remove, remove, save, 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, remove, remove, remove, save, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
-
-
-
Constructor Detail
-
BioMaterialDaoImpl
@Autowired public BioMaterialDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
create
public BioMaterial create(BioMaterial entity)
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
public BioMaterial save(BioMaterial entity)
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:
Session.persist(Object)
,Session.merge(Object)
-
update
public void update(BioMaterial entity)
- Specified by:
update
in interfaceBaseDao<BioMaterial>
- Overrides:
update
in classAbstractDao<BioMaterial>
- Parameters:
entity
- Update the entity. Not supported if the entity is immutable.
-
find
public BioMaterial find(BioMaterial bioMaterial)
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.
-
copy
public BioMaterial copy(BioMaterial bioMaterial)
- Specified by:
copy
in interfaceBioMaterialDao
-
findByExperiment
public Collection<BioMaterial> findByExperiment(ExpressionExperiment experiment)
- Specified by:
findByExperiment
in interfaceBioMaterialDao
-
getExpressionExperiment
public ExpressionExperiment getExpressionExperiment(Long bioMaterialId)
- Specified by:
getExpressionExperiment
in interfaceBioMaterialDao
- Parameters:
bioMaterialId
- biomaterial id- Returns:
- the experiment the biomaterial appears in
-
thaw
public void thaw(BioMaterial bioMaterial)
Description copied from interface:BioMaterialDao
Thaw the given BioMaterial.The following fields are initialized: sourceTaxon, treatments and factorValues.experimentalFactor.
- Specified by:
thaw
in interfaceBioMaterialDao
-
doLoadValueObject
protected BioMaterialValueObject doLoadValueObject(BioMaterial entity)
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>
-
-