Class ExpressionExperimentSetServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<ExpressionExperimentSet>
ubic.gemma.persistence.service.AbstractVoEnabledService<ExpressionExperimentSet,ExpressionExperimentSetValueObject>
ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentSetServiceImpl
- All Implemented Interfaces:
BaseImmutableService<ExpressionExperimentSet>
,BaseReadOnlyService<ExpressionExperimentSet>
,BaseService<ExpressionExperimentSet>
,BaseVoEnabledService<ExpressionExperimentSet,
,ExpressionExperimentSetValueObject> ExpressionExperimentSetService
@Service
public class ExpressionExperimentSetServiceImpl
extends AbstractVoEnabledService<ExpressionExperimentSet,ExpressionExperimentSetValueObject>
implements ExpressionExperimentSetService
Spring Service base class for
ubic.gemma.model.analysis.expression.ExpressionExperimentSetService
,
provides access to all services and entities referenced by this service.- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionExperimentSetServiceImpl
(ExpressionExperimentSetDao expressionExperimentSetDao, ExpressionExperimentService expressionExperimentService) -
Method Summary
Modifier and TypeMethodDescriptionfindByName
(String name) security at DAO levelsecurity at DAO levelGet the (security-filtered) list of experiments in a set.Get the member experiment value objects for the set id; security filtered.initAutomaticallyGeneratedExperimentSet
(Collection<ExpressionExperiment> expressionExperiments, Taxon taxon) Instantiate non-persistent experiment set with description = "Automatically generated for ## EEs.".boolean
isAutomaticallyGenerated
(String experimentSetDescription) Determines if set was automatically generated by matching the description to that used in ubic.gemma.core.analysis.expression .coexpression.ExpressionExperimentSetService.AUTOMATICALLY_GENERATED_EXPERIMENT_GROUP_DESCRIPTIONSecurity at DAO level.loadAllExperimentSetValueObjects
(boolean loadEEIds) Security filtering is handled by the call to load the set entities ubic.gemma.model.analysis.expression.ExpressionExperimentSetService.loadAllExperimentSetsWithTaxon()loadMySetValueObjects
(boolean loadEEIds) load the user's setsloadValueObjectById
(Long id, boolean loadEEIds) Get a value object for the id param.loadValueObjectsByIds
(Collection<Long> eeSetIds) Load value objects by a given collection of IDs.int
Remove an experiment from all sets it is in.thaw
(ExpressionExperimentSet expressionExperimentSet) void
update
(Collection<ExpressionExperimentSet> entities) Updates all entities in the given collection in the persistent storage.void
update
(ExpressionExperimentSet expressionExperimentSet) Updates the given entity in the persistent storage.Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjects
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, streamAll, streamAll
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, findOrCreate, remove, remove
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAll
Methods inherited from interface ubic.gemma.persistence.service.BaseService
save, save
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjects
-
Constructor Details
-
ExpressionExperimentSetServiceImpl
@Autowired public ExpressionExperimentSetServiceImpl(ExpressionExperimentSetDao expressionExperimentSetDao, ExpressionExperimentService expressionExperimentService)
-
-
Method Details
-
find
@Transactional(readOnly=true) public Collection<ExpressionExperimentSet> find(ExpressionExperiment ee) - Specified by:
find
in interfaceExpressionExperimentSetService
-
findByName
Description copied from interface:ExpressionExperimentSetService
security at DAO level- Specified by:
findByName
in interfaceExpressionExperimentSetService
- Parameters:
name
- name- Returns:
- collection of ee sets
-
findIds
Description copied from interface:ExpressionExperimentSetService
security at DAO level- Specified by:
findIds
in interfaceExpressionExperimentSetService
- Parameters:
ee
- BA set- Returns:
- collection of IDs
-
getExperimentsInSet
Description copied from interface:ExpressionExperimentSetService
Get the (security-filtered) list of experiments in a set.- Specified by:
getExperimentsInSet
in interfaceExpressionExperimentSetService
- Parameters:
id
- id- Returns:
- collection of ees
-
getExperimentValueObjectsInSet
@Transactional(readOnly=true) public Collection<ExpressionExperimentDetailsValueObject> getExperimentValueObjectsInSet(Long id) Description copied from interface:ExpressionExperimentSetService
Get the member experiment value objects for the set id; security filtered.- Specified by:
getExperimentValueObjectsInSet
in interfaceExpressionExperimentSetService
- Parameters:
id
- id- Returns:
- value objects or an empty set
-
initAutomaticallyGeneratedExperimentSet
public ExpressionExperimentSet initAutomaticallyGeneratedExperimentSet(Collection<ExpressionExperiment> expressionExperiments, Taxon taxon) Instantiate non-persistent experiment set with description = "Automatically generated for ## EEs.". Mostly for use in Gene2GenePopulationServiceImpl.intializeNewAnalysis(Collection, Taxon, Collection, String, int). By convention, these sets should not be modifiable.- Specified by:
initAutomaticallyGeneratedExperimentSet
in interfaceExpressionExperimentSetService
-
isAutomaticallyGenerated
@Transactional(readOnly=true) public boolean isAutomaticallyGenerated(String experimentSetDescription) Determines if set was automatically generated by matching the description to that used in ubic.gemma.core.analysis.expression .coexpression.ExpressionExperimentSetService.AUTOMATICALLY_GENERATED_EXPERIMENT_GROUP_DESCRIPTION- Specified by:
isAutomaticallyGenerated
in interfaceExpressionExperimentSetService
- Returns:
- true if the set was automatically generated, false otherwise
-
loadAllExperimentSetsWithTaxon
@Transactional(readOnly=true) public Collection<ExpressionExperimentSet> loadAllExperimentSetsWithTaxon()Description copied from interface:ExpressionExperimentSetService
Security at DAO level.- Specified by:
loadAllExperimentSetsWithTaxon
in interfaceExpressionExperimentSetService
- Returns:
- ExpressionExperimentSets that have more than 1 experiment in them & have a taxon value.
-
loadAllExperimentSetValueObjects
@Transactional(readOnly=true) public Collection<ExpressionExperimentSetValueObject> loadAllExperimentSetValueObjects(boolean loadEEIds) Description copied from interface:ExpressionExperimentSetService
Security filtering is handled by the call to load the set entities ubic.gemma.model.analysis.expression.ExpressionExperimentSetService.loadAllExperimentSetsWithTaxon()- Specified by:
loadAllExperimentSetValueObjects
in interfaceExpressionExperimentSetService
- Parameters:
loadEEIds
- whether the returned value object should have the ExpressionExperimentIds collection populated. This might be a useful information, but loading the IDs takes slightly longer, so for larger amount of EESets this might want to be avoided.- Returns:
- ExpressionExperimentSets that have more than 1 experiment in them & have a taxon value.
-
loadMySetValueObjects
@Transactional(readOnly=true) public Collection<ExpressionExperimentSetValueObject> loadMySetValueObjects(boolean loadEEIds) Description copied from interface:ExpressionExperimentSetService
load the user's sets- Specified by:
loadMySetValueObjects
in interfaceExpressionExperimentSetService
- Parameters:
loadEEIds
- whether the returned value object should have the ExpressionExperimentIds collection populated. This might be a useful information, but loading the IDs takes slightly longer, so for larger amount of EESets this might want to be avoided.- Returns:
- colelction of EE set VOs
-
loadValueObjectById
@Transactional(readOnly=true) public ExpressionExperimentSetValueObject loadValueObjectById(Long id, boolean loadEEIds) Description copied from interface:ExpressionExperimentSetService
Get a value object for the id param.- Specified by:
loadValueObjectById
in interfaceExpressionExperimentSetService
- Parameters:
id
- IDloadEEIds
- whether the returned value object should have the ExpressionExperimentIds collection populated. This might be a useful information, but loading the IDs takes slightly longer, so for larger amount of EESets this might want to be avoided.- Returns:
- null if id doesn't match an experiment set
-
loadValueObjectById
@Transactional(readOnly=true) public ExpressionExperimentSetValueObject loadValueObjectById(Long id) - Specified by:
loadValueObjectById
in interfaceBaseVoEnabledService<ExpressionExperimentSet,
ExpressionExperimentSetValueObject> - Specified by:
loadValueObjectById
in interfaceExpressionExperimentSetService
- Overrides:
loadValueObjectById
in classAbstractVoEnabledService<ExpressionExperimentSet,
ExpressionExperimentSetValueObject> - See Also:
-
loadValueObjectsByIds
@Transactional(readOnly=true) public List<ExpressionExperimentSetValueObject> loadValueObjectsByIds(Collection<Long> eeSetIds) Description copied from interface:BaseVoEnabledService
Load value objects by a given collection of IDs.- Specified by:
loadValueObjectsByIds
in interfaceBaseVoEnabledService<ExpressionExperimentSet,
ExpressionExperimentSetValueObject> - Specified by:
loadValueObjectsByIds
in interfaceExpressionExperimentSetService
- Overrides:
loadValueObjectsByIds
in classAbstractVoEnabledService<ExpressionExperimentSet,
ExpressionExperimentSetValueObject>
-
thaw
@Transactional(readOnly=true) public ExpressionExperimentSet thaw(ExpressionExperimentSet expressionExperimentSet) - Specified by:
thaw
in interfaceExpressionExperimentSetService
-
update
Description copied from interface:BaseService
Updates the given entity in the persistent storage.- Specified by:
update
in interfaceBaseService<ExpressionExperimentSet>
- Specified by:
update
in interfaceExpressionExperimentSetService
- Overrides:
update
in classAbstractService<ExpressionExperimentSet>
- Parameters:
expressionExperimentSet
- the entity to be updated.- See Also:
-
update
Description copied from interface:BaseService
Updates all entities in the given collection in the persistent storage.- Specified by:
update
in interfaceBaseService<ExpressionExperimentSet>
- Overrides:
update
in classAbstractService<ExpressionExperimentSet>
- Parameters:
entities
- the entities to be updated.
-
removeFromSets
Description copied from interface:ExpressionExperimentSetService
Remove an experiment from all sets it is in.Using this allows one to bypass the requirement of "owning edit rights" on the set as long as the current user has the right to edit the experiment itself.
If a set ends-up empty as a result, it is removed as well.
- Specified by:
removeFromSets
in interfaceExpressionExperimentSetService
- Returns:
- the number of sets this experiment was removed from
-