/** @param args */ public static void main(String[] args) { StudentService studentService = new StudentService(); /*Student s = studentService.findStudentBasedOnId(1); System.out.println(s.getStudentName());*/ Student s = new Student(10, "rama", "hydebad", new Date()); studentService.createStudent(s); System.out.println("success"); }
public String register() { if (newStudent.length() > 0) { studentService.registerStudent(newStudent); FacesContext.getCurrentInstance() .addMessage(null, new FacesMessage("Successfully registered dear " + newStudent)); } else { FacesContext.getCurrentInstance() .addMessage(null, new FacesMessage("Please give a username")); } return "index"; }
public List<Student> getStudentList() { return studentService.getStudentsList(); }