Package com.secondstack.training.spring.extjs.domain

Examples of com.secondstack.training.spring.extjs.domain.Student


    @RequestMapping(params = {"id"}, method = RequestMethod.GET)
    @ResponseBody
    public Student findById(@RequestParam("id")Integer id){
        logger.debug("Received rest request to get data student");
        Student student = studentService.findById(id);
//        Student student = studentService.findById(id);
        return student;
    }
View Full Code Here


        entityManager.persist(student);
    }

    @Override
    public Student update(Integer id, Student student){
        Student oldStudent = findById(id);
        oldStudent.setAddress(student.getAddress());
        oldStudent.setAge(student.getAge());
        oldStudent.setBirthDate(student.getBirthDate());
        oldStudent.setFirstName(student.getFirstName());
        oldStudent.setLastName(student.getLastName());
        oldStudent.setSex(student.getSex());
        return entityManager.merge(oldStudent);
    }
View Full Code Here

TOP

Related Classes of com.secondstack.training.spring.extjs.domain.Student

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.