Example #1
0
 private static void testDatabase() {
   Student student = (Student) studentDao.list("stud1").toArray()[0];
   System.out.println("last name: " + student.getLastName());
   System.out.println("group name: " + student.getGroup().getName());
   for (Student student1 : student.getGroup().getStudentList()) {
     System.out.println("students in group: " + student1.getFirstName());
   }
   System.out.println("curator last name: " + student.getGroup().getCurator().getLastName());
   for (GroupLection groupLection : student.getGroup().getCurator().getGroupLectionList()) {
     System.out.println("group lection time: " + groupLection.getDate());
   }
   LossStudent lossStudent = (LossStudent) lossStudentDao.list().toArray()[0];
   System.out.println(
       lossStudent.getDate()
           + " "
           + lossStudent.getStudent().getLastName()
           + " "
           + lossStudent.getLection().getName());
 }