Package org.encuestame.persistence.exception

Examples of org.encuestame.persistence.exception.EnMeExpcetion


            log.debug("Is connected exist? "+profileId);
            //check if this user is previously connected
            social = this.findAccountByConnection(profileId);
        } catch (EnMeExpcetion e) {
            log.fatal("isConected error :"+e);
            throw new EnMeExpcetion(e);
        }
        log.debug("Is connected "+social);
        return social;
    }
View Full Code Here


            comments.addAll(getCommentsOperations().getCommentsbPoll(poll, max, start));
        } else if (searchResult.equals(TypeSearchResult.SURVEY)) {
            final Survey survey = null;
            //TODO:
        } else {
            throw new EnMeExpcetion("invalid type");
        }
        return comments;
    }
View Full Code Here

            final Integer maxResults,
            final Integer start) throws EnMeExpcetion{
        List<CommentBean> commentBean = new ArrayList<CommentBean>();
        List<Comment> comments = new ArrayList<Comment>();
        if (keyword == null){
            throw new EnMeExpcetion("keyword is missing");
        }
        else {
            comments = getCommentsOperations().getCommentsByKeyword(keyword, maxResults, null);
            log.info(" Comments by keyword size" + comments.size());
            commentBean.addAll(ConvertDomainBean.convertListCommentDomainToBean(comments));
View Full Code Here

                            getUserAccount(getUserPrincipalUsername()), max,
                            start)));
        } else if (TypeSearch.ALL.equals(typeSearch)) {
            list.addAll(ConvertDomainBean.convertListToPollBean(getPollDao().retrievePollsByUserId(getUserAccountonSecurityContext(), max, start)));
        } else {
            throw new EnMeExpcetion("operation not valid");
        }
        return list;
    }
View Full Code Here

        } else if (TypeSearch.ALL.equals(pollSearch.getTypeSearch())) {
          //list.addAll(this.getPollsByUserNameSearch(getUserPrincipalUsername(), httpServletRequest, pollSearch));
          //FIXME: no advanced search enabled
          list.addAll(ConvertDomainBean.convertPollListToSearchBean(getPollDao().retrievePollsByUserId(getUserAccount(getUserPrincipalUsername()), pollSearch.getMax(), pollSearch.getStart())));
        } else {
      throw new EnMeExpcetion("operation not valid");
    }
    log.debug("Poll Search Items : " + list.size());
    return list;
  }
View Full Code Here

            this.createPollNotification(pollDomain);
            }
        } catch (Exception e) {
            e.printStackTrace();
            log.equals(e);
            throw new EnMeExpcetion(e);
        }
        return pollDomain;
    }
View Full Code Here

    public List<PollBean> searchPollByKeyword(final String keywordQuestion, final Integer maxResults,
        final Integer start) throws EnMeExpcetion{
        log.debug("search keyword Poll  "+keywordQuestion);
        List<Poll> polls = new ArrayList<Poll>();
        if (keywordQuestion == null) {
            throw new EnMeExpcetion("keyword is mandatory");
        } else {
            polls = getPollDao().getPollsByQuestionKeyword(keywordQuestion,
                    getUserAccount(getUserPrincipalUsername()), maxResults, start);
        }
        log.debug("search keyword polls size "+polls.size());
View Full Code Here

//                for (final QuestionAnswerBean answerBean : questionBean.getListAnswers()) {
//                    this.createQuestionAnswer(answerBean, question);
//                }
            } catch (Exception e) {
                log.error(e);
                throw new EnMeExpcetion(e);
            }
            return question;
    }
View Full Code Here

            //tweetPoll.setTweetId(tweetPollBean.getTweetId());
            //tweetPoll.setPublicationDateTweet(tweetPollBean.getPublicationDateTweet());
            tweetPoll.setPublishTweetPoll(Boolean.TRUE);
            getTweetPollDao().saveOrUpdate(tweetPoll);
        }else{
            throw new EnMeExpcetion("tweet poll not found");
        }
    }
View Full Code Here

     * @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

TOP

Related Classes of org.encuestame.persistence.exception.EnMeExpcetion

Copyright © 2018 www.massapicom. 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.