]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java
Salome HOME
Satisfy some PMD rules.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / StudyServiceImpl.java
index 4660ca75898c9be4f58134a98fc780e07401e95f..d75d3ccfa29cd440919d9bd6ac10de208b6a8753 100644 (file)
@@ -491,6 +491,7 @@ public class StudyServiceImpl implements StudyService {
 
                                ValidationCycleRelation link = cycle.getContext();
                                aStudy.addRelation(link);
+                               getValidationCycleDAO().flush();
                                aStudyDTO.getAllRelations().add(link); // RKV
 
                                validactor.put(cname, link.getTo()); // Replaces the cycle if exists as default,
@@ -1360,7 +1361,7 @@ public class StudyServiceImpl implements StudyService {
        public List<UserDTO> getReaders(final long studyId) throws InvalidParameterException {
                Study aStudy = selectStudy(studyId);
                if(aStudy == null){
-                       throw new InvalidParameterException("studyId", String.valueOf(studyId));
+                       throw new InvalidParameterException(PARAM_STUDY_ID, String.valueOf(studyId));
                }
                List<Relation> relations = aStudy.getRelations(ReaderRelation.class);
                List<UserDTO> result = new ArrayList<UserDTO>();
@@ -1378,7 +1379,7 @@ public class StudyServiceImpl implements StudyService {
        public boolean addReader(final long studyId, final long userId) throws InvalidParameterException {
                Study aStudy = selectStudy(studyId);
                if(aStudy == null){
-                       throw new InvalidParameterException("studyId", String.valueOf(studyId));
+                       throw new InvalidParameterException(PARAM_STUDY_ID, String.valueOf(studyId));
                }
                User user = _userService.selectUser(userId);
                if(user == null){
@@ -1403,7 +1404,7 @@ public class StudyServiceImpl implements StudyService {
        public boolean removeReader(final long studyId, final long userId) throws InvalidParameterException {
                Study aStudy = selectStudy(studyId);
                if(aStudy == null){
-                       throw new InvalidParameterException("studyId", String.valueOf(studyId));
+                       throw new InvalidParameterException(PARAM_STUDY_ID, String.valueOf(studyId));
                }
                User user = _userService.selectUser(userId);
                if(user == null){