Class GeneSetDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<GeneSet>
-
- ubic.gemma.persistence.service.genome.gene.GeneSetDaoImpl
-
- All Implemented Interfaces:
BaseDao<GeneSet>
,BaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
,GeneSetDao
@Repository @ParametersAreNonnullByDefault public class GeneSetDaoImpl extends AbstractDao<GeneSet> implements GeneSetDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of typeubic.gemma.model.genome.gene.GeneSet
.- Author:
- kelsey
- See Also:
GeneSet
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
elementClass, log
-
-
Constructor Summary
Constructors Constructor Description GeneSetDaoImpl(SessionFactory sessionFactory)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, remove, save, save
-
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, create, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, remove, save, save
-
-
-
-
Constructor Detail
-
GeneSetDaoImpl
@Autowired public GeneSetDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
getGeneCount
public int getGeneCount(Long id)
Description copied from interface:GeneSetDao
This method does not do any permissions filtering. It assumes that id the user can see the set, they can see all the members.- Specified by:
getGeneCount
in interfaceGeneSetDao
- Parameters:
id
- gene set id- Returns:
- integer count of genes in set
-
getTaxon
public Taxon getTaxon(GeneSet geneSet)
Description copied from interface:GeneSetDao
Returns the taxon of an arbitrary member of the set.- Specified by:
getTaxon
in interfaceGeneSetDao
- Returns:
- the taxon, or null if the gene set does not have any member
-
getTaxa
public List<Taxon> getTaxa(GeneSet geneSet)
Description copied from interface:GeneSetDao
Return all the taxa of the gene set members.- Specified by:
getTaxa
in interfaceGeneSetDao
-
loadValueObject
public DatabaseBackedGeneSetValueObject loadValueObject(GeneSet geneSet)
Description copied from interface:BaseVoEnabledDao
Load a value object corresponding to an entity- Specified by:
loadValueObject
in interfaceBaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
- Parameters:
geneSet
- the entity to turn into a value object- Returns:
- a value object
-
loadValueObjectById
public DatabaseBackedGeneSetValueObject loadValueObjectById(Long id)
- Specified by:
loadValueObjectById
in interfaceBaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
- Returns:
- a value object, or null if it could not be constructed
-
loadValueObjectByIdLite
public DatabaseBackedGeneSetValueObject loadValueObjectByIdLite(Long id)
- Specified by:
loadValueObjectByIdLite
in interfaceGeneSetDao
-
loadValueObjects
public List<DatabaseBackedGeneSetValueObject> loadValueObjects(Collection<GeneSet> entities)
Description copied from interface:BaseVoEnabledDao
Load value objects corresponding to entities- Specified by:
loadValueObjects
in interfaceBaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
- Parameters:
entities
- the entities to turn into value objects- Returns:
- a collection of value objects
-
loadValueObjectsByIds
public List<DatabaseBackedGeneSetValueObject> loadValueObjectsByIds(Collection<Long> ids)
- Specified by:
loadValueObjectsByIds
in interfaceBaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
-
loadValueObjectsByIdsLite
public List<DatabaseBackedGeneSetValueObject> loadValueObjectsByIdsLite(Collection<Long> ids)
- Specified by:
loadValueObjectsByIdsLite
in interfaceGeneSetDao
-
loadAllValueObjects
public List<DatabaseBackedGeneSetValueObject> loadAllValueObjects()
- Specified by:
loadAllValueObjects
in interfaceBaseVoEnabledDao<GeneSet,DatabaseBackedGeneSetValueObject>
-
findByGene
public Collection<GeneSet> findByGene(Gene gene)
- Specified by:
findByGene
in interfaceGeneSetDao
-
findByName
public Collection<GeneSet> findByName(String name)
- Specified by:
findByName
in interfaceGeneSetDao
- Parameters:
name
- uses the given name to do a name* search in the db- Returns:
- a collection of geneSets that match the given search term.
-
findByName
public Collection<GeneSet> findByName(String name, @Nullable Taxon taxon)
- Specified by:
findByName
in interfaceGeneSetDao
-
loadAll
public Collection<GeneSet> loadAll(@Nullable Taxon tax)
- Specified by:
loadAll
in interfaceGeneSetDao
-
find
public GeneSet find(GeneSet entity)
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).
-
thaw
public void thaw(GeneSet geneSet)
- Specified by:
thaw
in interfaceGeneSetDao
- Parameters:
geneSet
- gene set
-
removeAll
public int removeAll()
- Specified by:
removeAll
in interfaceGeneSetDao
-
update
public final void update(Collection<GeneSet> entities)
-
update
public final void update(GeneSet entity)
-
remove
public final void remove(Collection<GeneSet> entities)
-
-