Class ExpressionExperimentSetValueObjectHelperImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentSetValueObjectHelperImpl
-
- All Implemented Interfaces:
ExpressionExperimentSetValueObjectHelper
@Component public class ExpressionExperimentSetValueObjectHelperImpl extends Object implements ExpressionExperimentSetValueObjectHelper
This class will handle population of ExpressionExperimentSetValueObjects. Services need to be accessed in order to fill size, experiment ids, and publik/private fields.- Author:
- tvrossum
-
-
Constructor Summary
Constructors Constructor Description ExpressionExperimentSetValueObjectHelperImpl(ExpressionExperimentSetService expressionExperimentSetService, ExpressionExperimentService expressionExperimentService, TaxonService taxonService, gemma.gsec.SecurityService securityService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressionExperimentSet
convertToEntity(ExpressionExperimentSetValueObject setVO)
Tries to load an existing experiment set with the param's id, if no experiment can be loaded, create a new one with id = null.ExpressionExperimentSet
create(ExpressionExperimentSetValueObject eesvo)
Create an experiment set from a VO.void
delete(ExpressionExperimentSetValueObject eesvo)
Delete the experiment set corresponding to the given VO.void
update(ExpressionExperimentSetValueObject eesvo)
Update corresponding entity based on value objectvoid
updateMembers(Long groupId, Collection<Long> eeIds)
Updates the database record for the param experiment set value object (permission permitting) with the members specified of the set, not the name or description etc.ExpressionExperimentSetValueObject
updateNameAndDescription(ExpressionExperimentSetValueObject eeSetVO, boolean loadEEIds)
Updates the database record for the param experiment set value object (permission permitting) with the value object's name and description.
-
-
-
Constructor Detail
-
ExpressionExperimentSetValueObjectHelperImpl
@Autowired public ExpressionExperimentSetValueObjectHelperImpl(ExpressionExperimentSetService expressionExperimentSetService, ExpressionExperimentService expressionExperimentService, TaxonService taxonService, gemma.gsec.SecurityService securityService)
-
-
Method Detail
-
create
@Transactional public ExpressionExperimentSet create(ExpressionExperimentSetValueObject eesvo)
Description copied from interface:ExpressionExperimentSetValueObjectHelper
Create an experiment set from a VO.The set is made public if
ExpressionExperimentSetValueObject.getIsPublic()
is true, otherwise it is made private.- Specified by:
create
in interfaceExpressionExperimentSetValueObjectHelper
-
update
@Transactional public void update(ExpressionExperimentSetValueObject eesvo)
Description copied from interface:ExpressionExperimentSetValueObjectHelper
Update corresponding entity based on value object- Specified by:
update
in interfaceExpressionExperimentSetValueObjectHelper
-
updateNameAndDescription
@Transactional public ExpressionExperimentSetValueObject updateNameAndDescription(ExpressionExperimentSetValueObject eeSetVO, boolean loadEEIds)
Description copied from interface:ExpressionExperimentSetValueObjectHelper
Updates the database record for the param experiment set value object (permission permitting) with the value object's name and description.- Specified by:
updateNameAndDescription
in interfaceExpressionExperimentSetValueObjectHelper
loadEEIds
- whether the returned value object should have theExpressionExperimentSetValueObject.getExpressionExperimentIds()
collection populated. This might be useful information, but loading the IDs takes slightly longer, so for larger amount of EE sets this might want to be avoided.
-
updateMembers
@Transactional public void updateMembers(Long groupId, Collection<Long> eeIds)
Description copied from interface:ExpressionExperimentSetValueObjectHelper
Updates the database record for the param experiment set value object (permission permitting) with the members specified of the set, not the name or description etc.- Specified by:
updateMembers
in interfaceExpressionExperimentSetValueObjectHelper
-
delete
@Transactional public void delete(ExpressionExperimentSetValueObject eesvo)
Description copied from interface:ExpressionExperimentSetValueObjectHelper
Delete the experiment set corresponding to the given VO.- Specified by:
delete
in interfaceExpressionExperimentSetValueObjectHelper
-
convertToEntity
public ExpressionExperimentSet convertToEntity(ExpressionExperimentSetValueObject setVO)
Tries to load an existing experiment set with the param's id, if no experiment can be loaded, create a new one with id = null. Sets all fields of the new entity with values from the valueObject param.- Specified by:
convertToEntity
in interfaceExpressionExperimentSetValueObjectHelper
- Parameters:
setVO
- if null, returns null- Returns:
- ee set
-
-