示例#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");
 }
示例#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";
 }
示例#3
0
 public List<Student> getStudentList() {
   return studentService.getStudentsList();
 }