Package com.sahuaro.interfaces

Examples of com.sahuaro.interfaces.ISuggestionRepository


        String email = req.getParameter("email");
        String message = req.getParameter("message");
       
        IProspectRepository prospectRepo = new ProspectRepository();
        IMessageRepository messageRepo = new MessageRepository();
        ISuggestionRepository suggRepo = new SuggestionRepository();
        //creates a prospect
        Prospect prospect = new Prospect(firstName, lastName, email);
        Key<Prospect> prospKey = prospectRepo.save(prospect);
        //creates a contact
        Message messageObj = new Message(message, prospKey.getId());
        Key<Message> msgKey = messageRepo.save(messageObj);
       
        Suggestion suggestion = new Suggestion(message, msgKey.getId());
        Key<Suggestion> suggKey = suggRepo.save(suggestion);
       
        //creates an EmailSender instance
        EmailSender<Suggestion> sender = new EmailSender<Suggestion>(suggestion);
        sender.sendEmail(email, message, prospect);
        resp.sendRedirect("/about.jsp");
View Full Code Here

TOP

Related Classes of com.sahuaro.interfaces.ISuggestionRepository

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.