@Override
 public List<Report> findByTeacher() {
   User user = (User) ActionContext.getContext().getSession().get("user");
   return getSession()
       .createQuery("from Report r where r.task.user.id=? ")
       .setParameter(0, user.getId())
       .list();
 }
 @Override
 public List<Report> findByUser() {
   // TODO Auto-generated method stub
   User user = (User) ActionContext.getContext().getSession().get("user");
   return getSession()
       .createQuery("from Report r where r.user.id=? ")
       .setParameter(0, user.getId())
       .list();
 }