Package org.encuestame.persistence.exception

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException


    public void deleteSurveyFolder(final Long folderId) throws EnMeNoResultsFoundException{
        final SurveyFolder surveyFolder = this.getSurveyFolder(folderId);
        if(surveyFolder != null){
            getSurveyDaoImp().delete(surveyFolder);
        } else {
            throw new EnMeNoResultsFoundException("Survey folder not found");
        }
    }
View Full Code Here


        List<Survey> surveysByFolder = new ArrayList<Survey>();
        if (surveyFolder != null) {
            surveysByFolder = getSurveyDaoImp().retrieveSurveyByFolder(
                    accountId, folderId);
        } else {
            throw new EnMeNoResultsFoundException("Survey folder not found");
        }

        return surveysByFolder;
    }
View Full Code Here

        if(surveyFolder!=null) {
            final Survey survey = getSurveyDaoImp().getSurveyByIdandUserId(surveyId, getUserAccountId(username));
            survey.setSurveysfolder(surveyFolder);
            getSurveyDaoImp().saveOrUpdate(survey);
            } else {
            throw new EnMeNoResultsFoundException("Survey folder not found");
        }
   }
View Full Code Here

            geoPointType.setLocationTypeDescription(locationTypeBean.getLocTypeDesc());
            geoPointType.setLocationTypeLevel(locationTypeBean.getLevel());
            getGeoPointTypeDao().saveOrUpdate(geoPointType);
        }
        else{
            throw new EnMeNoResultsFoundException("location type not found");
        }
    }
View Full Code Here

     * @throws EnMeNoResultsFoundException
     */
    public void updateLocationName(final UnitLocationBean locationBean, final String username) throws EnMeNoResultsFoundException{
        final GeoPoint location = getLocation(locationBean.getId(), username);
        if(location == null){
            throw new EnMeNoResultsFoundException("location not found");
        }
        else{
            final String lastName = location.getLocationDescription();
            location.setLocationDescription(locationBean.getName());
            getGeoPointDao().saveOrUpdate(location);
View Full Code Here

            final String username, final String typeUpdate)
            throws EnMeNoResultsFoundException {
        final GeoPointFolder locationFolder = getLocationFolder(locationFolderBean
                .getId(), username);
        if (locationFolder == null) {
            throw new EnMeNoResultsFoundException("location folder not found");
        }
        else {
            if (typeUpdate.equals("name")) {
                log.debug("updating folder name");
                locationFolder.setFolderName(locationFolderBean.getName());
View Full Code Here

        log.info("createDefaultILocationItem");
        final GeoPointFolder locationFolder = getLocationFolder(locationFolderBean
                .getId(), username);
        log.info("createDefaultILocationItem locationFolder "+locationFolder);
        if (locationFolder == null) {
            throw new EnMeNoResultsFoundException("location folder not found");
        }
        else {
            final GeoPoint geopoint = new GeoPoint();
            geopoint.setGeoPointFolder(locationFolder);
            geopoint.setAccount(getUserAccount(username).getAccount());
View Full Code Here

     */
    public void deleteLocationFolder(final UnitLocationFolder unitLocationFolder, final String username) throws EnMeNoResultsFoundException{
        final GeoPointFolder locationFolder = getLocationFolder(unitLocationFolder.getId(), username);
        log.info("deleteLocationFolder locationFolder "+locationFolder);
        if (locationFolder == null) {
            throw new EnMeNoResultsFoundException("location folder not found");
        }
        else {
            //TODO: we need remove items on CASCADE.
            final List<GeoPoint> itemsToDelete = getGeoPointDao()
                                    .getLocationByFolder(locationFolder.getLocationFolderId(), getUserAccountId(username));
View Full Code Here

     * @param username
     */
    public void deleteLocationItem(final UnitLocationBean unitLocationBean, final String username) throws EnMeNoResultsFoundException{
        final GeoPoint location = getLocation(unitLocationBean.getId(), username);
        if(location == null){
            throw new EnMeNoResultsFoundException("location not found");
        }
        else{
           //TODO: Maybe we have conflict in the future if this location was used on other tables, delete on cascade
           // will not a good option, we need think how to resolve this problem.
           // A possible solution is change status to INACTIVE, and it not show on tree.
View Full Code Here

            } else if (gadget.getGadgetType().equals(GadgetType.COMMENTS)) {
                createProperty(gadget, "permissions", gProperties.getProperty("permissions"));
            } else if (gadget.getGadgetType().equals(GadgetType.TWEETPOLLS_VOTES)) {
                createProperty(gadget, "permissions", gProperties.getProperty("permissions"));
            } else {
                throw new EnMeNoResultsFoundException("gadget not found");
            }
            return gadget;
        } else {
            throw new EnMeGadgetNotFoundException("gadget invalid");
        }
View Full Code Here

TOP

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

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.