Examples of EnMeNoResultsFoundException


Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

    public FolderBean updateFolderName(final Long folderId,
            final String newFolderName,
            final String username) throws EnMeNoResultsFoundException{
        final PollFolder folder = this.getPollFolder(folderId);
        if(folder == null){
            throw new EnMeNoResultsFoundException("poll folder not found");
        } else {
            folder.setFolderName(newFolderName);
            getPollDao().saveOrUpdate(folder);
        }
        return ConvertDomainBean.convertFolderToBeanFolder(folder);
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     * @return
     * @throws EnMeNoResultsFoundException
     */
    private PollFolder getPollFolder(final Long id) throws EnMeNoResultsFoundException{
        if(id == null){
             throw new EnMeNoResultsFoundException("poll folder id not found");
        }else {
        return this.getPollDao().getPollFolderById(id);
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

    public void removePollFolder(final Long folderId) throws EnMeNoResultsFoundException{
        final PollFolder folder = this.getPollFolder(folderId);
        if(folder != null){
            getPollDao().delete(folder);
        } else {
            throw new EnMeNoResultsFoundException("poll folder not found");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

                                throws EnMeNoResultsFoundException{
        final PollFolder pfolder = this.getPollFolderByFolderIdandUser(folderId, getUserAccount(getUserPrincipalUsername()));
        if (pfolder != null) {
            final Poll poll = getPollDao().getPollById(pollId, getUserAccount(getUserPrincipalUsername()));
            if (poll == null){
                throw new EnMeNoResultsFoundException("TweetPoll not found");
             }
            poll.setPollFolder(pfolder);
            getPollDao().saveOrUpdate(poll);
        } else {
            throw new EnMeNoResultsFoundException("TweetPoll folder not found");
    }
}
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

        List<Poll> pollList = new ArrayList<Poll>();
        if (date !=null){
            pollList = getPollDao().getPollByUserIdDate(date, getUserAccount(getUserPrincipalUsername()), maxResults, start);
        }
        else{
            throw new EnMeNoResultsFoundException("Date not found");
        }
        return ConvertDomainBean.convertSetToPollBean(pollList);
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

            final UserAccount account) throws EnMeNoResultsFoundException {
        final Poll poll = this.getPollById(pollId);
        QuestionAnswer qA = getQuestionDao().retrieveAnswersByQuestionId(
                poll.getQuestion(), answerId);
        if (qA == null) {
            throw new EnMeNoResultsFoundException("Answer not found");
        }
        return poll;
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     * @throws EnMeNoResultsFoundException
     */
    public QuestionAnswer getQuestionAnswerById(final Long id) throws EnMeNoResultsFoundException{
        final QuestionAnswer answer = getQuestionDao().retrieveAnswerById(id);
        if (answer == null) {
            throw new EnMeNoResultsFoundException("answer not found");
        }
        return  answer;
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     */
    public Question getQuestionById(final Long id)
            throws EnMeNoResultsFoundException {
        final Question question = getQuestionDao().retrieveQuestionById(id);
        if (question == null) {
            throw new EnMeNoResultsFoundException(
                    "Question not found with this id:" + id);
        } else {
            return question;
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

            final Long socialAccountId, final String username)
            throws EnMeNoResultsFoundException {
        final SocialAccount socialAccount = getAccountDao().getSocialAccount(
                socialAccountId, getAccount(username));
        if (socialAccount == null) {
            throw new EnMeNoResultsFoundException("Social Account id not valid");
        }
        return socialAccount;
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

            final HttpServletRequest request) throws EnMeExpcetion {
        try{
            final Question question = createTweetPollQuestion(questionName, user);
            log.debug("question found:{" + question);
            if (question == null) {
                throw new EnMeNoResultsFoundException("question not found");
            } else {
                final TweetPoll tweetPollDomain = newTweetPoll(tweetPollBean, question);
                //save Hash tags for this tweetPoll.
                log.debug("HashTag size:{"+tweetPollBean.getHashTags().size());
                //update TweetPoll.
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.