Ejemplo n.º 1
0
 /** @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");
 }
Ejemplo n.º 2
0
 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";
 }
Ejemplo n.º 3
0
 public List<Student> getStudentList() {
   return studentService.getStudentsList();
 }