Package com.evasion.entity.booktravel

Examples of com.evasion.entity.booktravel.RoadMap


            throw new IllegalArgumentException("Comment can have a user; it can't be null");
        }
        if (StringUtils.isBlank(commentaireNew.getText())) {
            throw new IllegalArgumentException("Comment text can be blank or null");
        }
        final RoadMap roadMapBDD = this.roadMapDAO.findById(roadMap.getId());
        final boolean result;

        if (roadMapBDD.getContribution() == null) {
            result = false;
        } else {

            result = roadMapBDD.getContribution().addCommentaire(commentaireNew);
            this.roadMapDAO.merge(roadMapBDD);
            eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                    roadMap.getId().toString(), "ADD_COMMENT_ON_ROADMAP");
        }
        return result;
View Full Code Here


    public void createRoadMap(final Long idBookTravel,
            final Contribution contribution, final Itinerary itinerary)
            throws EvasionException {
        final BookTravel bookTravel = bookTravelDAO.findById(idBookTravel);
        contribution.setUser(this.getPrinciaplUserName());
        final RoadMap roadMap = new RoadMap(contribution, itinerary, bookTravel);

        roadMapDAO.persist(roadMap);
        eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                roadMap.getId().toString(), "CREATE_ROADMAP");
    }
View Full Code Here

    public RoadMap findRoadMapById(Long id) throws EvasionException {
        if (id == null) {
            throw new UnsupportedOperationException("Properties id"
                    + " can not be null");
        }
        RoadMap result = roadMapDAO.findById(id);
        if (result != null) {
            result.getContribution().getCommentaires().size(); // force la remontée en lazy;
        }
        return result;
    }
View Full Code Here

            throw new IllegalArgumentException("Comment can have a user; it can't be null");
        }
        if (StringUtils.isBlank(commentaireNew.getText())) {
            throw new IllegalArgumentException("Comment text can be blank or null");
        }
        final RoadMap roadMapBDD = this.roadMapDAO.findById(roadMap.getId());
        final boolean result;

        if (roadMapBDD.getContribution() == null) {
            result = false;
        } else {

            result = roadMapBDD.getContribution().addCommentaire(commentaireNew);
            this.roadMapDAO.merge(roadMapBDD);
            eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                    roadMap.getId().toString(), "ADD_COMMENT_ON_ROADMAP");
        }
        return result;
View Full Code Here

    @Override
    public void createRoadMap(final Long idBookTravel,
            final Contribution contribution, final Itinerary itinerary)
            throws BookTravelServiceException {
        final BookTravel bookTravel = bookTravelDAO.findById(idBookTravel);
        final RoadMap roadMap = new RoadMap(contribution, itinerary, bookTravel);

        roadMapDAO.persist(roadMap);
        eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                roadMap.getId().toString(), "CREATE_ROADMAP", roadMap.getContribution().getUser());
    }
View Full Code Here

            throw new IllegalArgumentException("Comment can have a user; it can't be null");
        }
        if (StringUtils.isBlank(commentaireNew.getText())) {
            throw new IllegalArgumentException("Comment text can be blank or null");
        }
        final RoadMap roadMapBDD = this.roadMapDAO.findById(roadMap.getId());
        final boolean result;

        if (roadMapBDD.getContribution() == null) {
            result = false;
        } else {

            result = roadMapBDD.getContribution().addCommentaire(commentaireNew);
            this.roadMapDAO.merge(roadMapBDD);
            eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                    roadMap.getId().toString(), "ADD_COMMENT_ON_ROADMAP", commentaireNew.getUser());
        }
        return result;
View Full Code Here

            Location loc = itinerary.getBreakPoints().get(i);

            geolocEJB.getLocationByid(loc.getId());
            itinerary.replaceBreakPoint(i, geolocEJB.getLocationByid(loc.getId()));
        }
        final RoadMap roadMap = new RoadMap(contribution, itinerary, bookTravel);

        roadMapDAO.persist(roadMap);
        eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                roadMap.getId().toString(), "CREATE_ROADMAP");
    }
View Full Code Here

    public RoadMap findRoadMapById(Long id) throws EvasionException {
        if (id == null) {
            throw new UnsupportedOperationException("Properties id"
                    + " can not be null");
        }
        RoadMap result = roadMapDAO.findById(id);
        if (result != null) {
            result.getContribution().getCommentaires().size(); // force la remontée en lazy;
        }
        return result;
    }
View Full Code Here

            throw new IllegalArgumentException("Comment can have a user; it can't be null");
        }
        if (StringUtils.isBlank(commentaireNew.getText())) {
            throw new IllegalArgumentException("Comment text can be blank or null");
        }
        final RoadMap roadMapBDD = this.roadMapDAO.findById(roadMap.getId());
        final boolean result;

        if (roadMapBDD.getContribution() == null) {
            result = false;
        } else {

            result = roadMapBDD.getContribution().addCommentaire(commentaireNew);
            this.roadMapDAO.merge(roadMapBDD);
            eventEJB.addEvent(Constante.PLUGIN_NAME, RoadMap.class.getSimpleName(),
                    roadMap.getId().toString(), "ADD_COMMENT_ON_ROADMAP");
        }
        return result;
View Full Code Here

        Map<RoadMap, List<EventData>> roadMapEvent = new HashMap<RoadMap, List<EventData>>();
        List<EventData> events = eventEJB.getEventforPluginSince(since, null, "Plugin-Travel");
        for (EventData eventData : events) {
            if (eventData.getEntityName().equals(RoadMap.class.getSimpleName())) {
                try {
                    RoadMap roadMap = bookEJB.findRoadMapById(new Long(eventData.getEntityId()));
                    List listValue;
                    if (roadMapEvent.containsKey(roadMap)) {
                        listValue = roadMapEvent.get(roadMap);
                        listValue.add(eventData);
                    } else {
View Full Code Here

TOP

Related Classes of com.evasion.entity.booktravel.RoadMap

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.