Examples of EnMeExpcetion


Examples of org.encuestame.persistence.exception.EnMeExpcetion

                log.debug("created domain project");
                createNotification(NotificationEnum.PROJECT_CREATED, secondary.getUsername() +" is the leader of this project.", user);
            }
            catch (Exception e) {
                log.error(e.getMessage());
                throw new EnMeExpcetion(e);
            }
            return projectBean;
        }
        else {
            throw new EnMeExpcetion("error on create project");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

     */
    public void updateProject(final UnitProjectBean projectBean, final String username) throws EnMeExpcetion {
        log.debug("project bean "+projectBean.toString());
        final Project project = getProjectDaoImp().getProjectbyId(projectBean.getId());
        if(project == null){
            throw new EnMeExpcetion("project not found");
        }
        else{
            final UserAccount secondary = getAccountDao().getUserAccountById(projectBean.getLeader());
            final Account user = getUserAccount(username).getAccount();
            project.setProjectName(projectBean.getName());
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

                    this.createQuestionAnswer(answerBean, question);
                }
            }
            catch (Exception e) {
                log.error("Error Creating Question "+e.getMessage());
                throw new EnMeExpcetion(e);
            }
            return question;
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

     * @throws EnMeExpcetion exception
     */
    public void updateAnswerByAnswerId(final Long answerId, String nameUpdated) throws EnMeExpcetion{
            final QuestionAnswer answer = getQuestionDao().retrieveAnswerById(answerId);
            if(answer==null){
                throw new EnMeExpcetion("answer not found");
            }
            answer.setAnswer(nameUpdated);
            getQuestionDao().saveOrUpdate(answer);
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

                    q.setQuestionName(questions.getQuestion());
                    listQuestionBean.add(q);
                }
            }
        } catch (HibernateException e) {
            throw new EnMeExpcetion(e);
        } catch (Exception e) {
            throw new EnMeExpcetion(e);
        }
        return  listQuestionBean;
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

            final String keyword, final Integer maxResults, final Integer start)
            throws EnMeExpcetion {
        log.info("search keyword survey  " + keyword);
        List<Survey> surveys = new ArrayList<Survey>();
        if (keyword == null) {
            throw new EnMeExpcetion("keyword is missing");
        } else {
            // TODO: migrate search to Hibernate Search.
            surveys = getSurveyDaoImp().retrieveSurveybyName(keyword,
                    getUserAccountId(username), maxResults, start);
        }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

        // Search record by tweetPpll in access Rate domain.
        List<AccessRate> rateList = this.getAccessRateItem(ipAddress,
                tpoll.getTweetPollId(), TypeSearchResult.TWEETPOLL);
        final AccessRate accessRate;
        if (rateList.size() > 1) {
            throw new EnMeExpcetion(
                    "Access rate list found coudn't be greater than one ");
        } else if (rateList.size() == 1) {
            // Get first element from access rate list
            accessRate = rateList.get(0);
            // Check if the option selected is the same that you have registered
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

        // Search record by poll in access Rate domain.
        List<AccessRate> rateList = this.getAccessRateItem(ipAddress,
                poll.getPollId(), TypeSearchResult.POLL);
        final AccessRate accessRate;
        if (rateList.size() > 1) {
            throw new EnMeExpcetion(
                    "Access rate list found coudn't be greater than one ");
        } else if (rateList.size() == 1) {
            // Get first element from access rate list
            accessRate = rateList.get(0);
            // Check if the option selected is the same that you have registered
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

        // Search record by survey in access Rate domain.
        List<AccessRate> rateList = this.getAccessRateItem(ipAddress,
                survey.getSid(), TypeSearchResult.SURVEY);
        final AccessRate accessRate;
        if (rateList.size() > 1) {
            throw new EnMeExpcetion(
                    "Access rate list found coudn't be greater than one ");
        } else if (rateList.size() == 1) {
            // Get first element from access rate list
            accessRate = rateList.get(0);
            // Check if the option selected is the same that you have registered
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeExpcetion

                locationTypeDomain.setUsers(getUserAccount(getUserPrincipalUsername()).getAccount());
                getGeoPointTypeDao().saveOrUpdate(locationTypeDomain);
                locatTypeBean.setIdLocType(locationTypeDomain
                        .getLocationTypeId());
            } catch (Exception e) {
                throw new EnMeExpcetion(e);
            }
            return locatTypeBean;
        } else {
            throw new EnMeExpcetion("Cat Location Type is null");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.