IsDirectedByCourseTeacher isDirected = new IsDirectedByCourseTeacher((User) i.next(), course);
IsDirectedByCourseTeacher isDirected = (IsDirectedByCourseTeacher) i.next();
	public void removeCourse(Course course) throws RemoteException, HibernateException {	    Session session = null;        try {            TransactionManager.beginTransaction();            session = Hibernate.getCurrentSession();            Set p = course.getGroupsSubjectsTakingPart();            if (p != null) {	            for (Iterator i = p.iterator(); i.hasNext(); )	                remove(TABLE_ASSOCIATION, new _TakePartGroupSubjectCourseFilter((TakePartGroupSubjectCourse)i.next()), session);            }            Collection c = course.getTeachersDirecting();            if (c != null) {	            for (Iterator i = c.iterator(); i.hasNext(); ) {	                IsDirectedByCourseTeacher isDirected = new IsDirectedByCourseTeacher((User) i.next(), course);	                remove(TABLE_ISDIRECTING, new _IsDirectedByCourseTeacherFilter(isDirected), session);	            }            }            remove(TABLE_COURSE, new CourseFilter(course), session);            TransactionManager.commit();        } catch (HibernateException e) {            TransactionManager.rollback();            throw e;        } finally {            Hibernate.closeSession();        }	}