Package org.springframework.data.mongodb.examples.custsvc.domain

Examples of org.springframework.data.mongodb.examples.custsvc.domain.SurveyInfo


    @RequestMapping(value = "/customerClear/{id}")
    @Transactional
    public String clear(@PathVariable Long id) {
        Customer customer = customerRepository.findOne(id);
        if (customer != null) {
            customer.setSurveyInfo(new SurveyInfo());
            customerRepository.save(customer);
        }
        return "redirect:/customer/" + id;
    }
View Full Code Here


    @Transactional
    public String processSubmit(@PathVariable Long id, @ModelAttribute("survey") Survey survey, BindingResult result, SessionStatus status) {
        status.setComplete();
        Customer customer = customerRepository.findOne(id);
        if (customer.getSurveyInfo() == null) {
            customer.setSurveyInfo(new SurveyInfo());
        }
        if (survey.getQuestion() != null && survey.getQuestion().trim().length() > 0) {
            customer.getSurveyInfo().addQuestionsAndAnswer(survey);
            customerRepository.save(customer);
        }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.examples.custsvc.domain.SurveyInfo

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.