Examples of Recommendation


Examples of org.itcr.myguru.model.Recommendation

        // :: Find Recommendation
        int id = -1;
        try {
            id = Integer.parseInt(id_raw);
        } catch(Exception e) {}
        Recommendation recm = dao.findRecommendationById(id);
        if(recm == null) {
            result.setMessage("Recommendation not found");
            result.setStatus(-3);
            out.print(result);
            out.flush();
            out.close();
            return;
        }
        //  :: Check ownership
        if(recm.getAssignedTo().getId() != user.getId()) {
            result.setMessage("You are not owner");
            result.setStatus(-4);
        } else {
            // Return object
            result.setMessage("Success");
            result.setStatus(recm.getStatus());
           
            String answer = recm.getAnswer();
            if(answer == null) {
                answer = "";
            }
            result.setAnswer(answer);
           
            String link = recm.getLink();
            if(link == null) {
                link = "";
            }
            result.setLink(link);
        }
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.