Search in sources :

Example 1 with StudentGroup

use of fi.otavanopisto.pyramus.domainmodel.students.StudentGroup in project pyramus by otavanopisto.

the class EditCourseJSONRequestController method processSignupStudentGroups.

private void processSignupStudentGroups(JSONRequestContext requestContext, Course course, StaffMember loggedUser) {
    CourseSignupStudentGroupDAO courseSignupStudentGroupDAO = DAOFactory.getInstance().getCourseSignupStudentGroupDAO();
    StudentGroupDAO studentGroupDAO = DAOFactory.getInstance().getStudentGroupDAO();
    List<CourseSignupStudentGroup> signupStudentGroups = courseSignupStudentGroupDAO.listByCourse(course);
    Integer studentGroupsRowCount = requestContext.getInteger("signupStudentGroupsTable.rowCount");
    if (studentGroupsRowCount != null) {
        Set<Long> studentGroupIdsPresent = new HashSet<>();
        for (int i = 0; i < studentGroupsRowCount; i++) {
            Long studentGroupId = requestContext.getLong(String.format("signupStudentGroupsTable.%d.studentGroupId", i));
            if (studentGroupId != null) {
                studentGroupIdsPresent.add(studentGroupId);
            }
        }
        // Create missing groups
        studentGroupIdsPresent.forEach(studentGroupId -> {
            if (signupStudentGroups.stream().noneMatch(signupStudentGroup -> Objects.equals(signupStudentGroup.getStudentGroup().getId(), studentGroupId))) {
                StudentGroup studentGroup = studentGroupDAO.findById(studentGroupId);
                if ((studentGroup != null) && UserUtils.canAccessOrganization(loggedUser, studentGroup.getOrganization())) {
                    courseSignupStudentGroupDAO.create(course, studentGroup);
                } else {
                    throw new SmvcRuntimeException(PyramusStatusCode.UNAUTHORIZED, "Invalid organization.");
                }
            }
        });
        // Remove groups that don't exist anymore
        signupStudentGroups.stream().filter(signupStudentGroup -> !studentGroupIdsPresent.contains(signupStudentGroup.getStudentGroup().getId())).forEach(signupStudentGroup -> {
            if (UserUtils.canAccessOrganization(loggedUser, signupStudentGroup.getStudentGroup().getOrganization())) {
                courseSignupStudentGroupDAO.delete(signupStudentGroup);
            } else {
                throw new SmvcRuntimeException(PyramusStatusCode.UNAUTHORIZED, "Invalid organization.");
            }
        });
    }
}
Also used : CourseStaffMember(fi.otavanopisto.pyramus.domainmodel.courses.CourseStaffMember) Arrays(java.util.Arrays) StringUtils(org.apache.commons.lang.StringUtils) StaffMember(fi.otavanopisto.pyramus.domainmodel.users.StaffMember) Organization(fi.otavanopisto.pyramus.domainmodel.base.Organization) CourseSignupStudyProgramme(fi.otavanopisto.pyramus.domainmodel.courses.CourseSignupStudyProgramme) CourseDAO(fi.otavanopisto.pyramus.dao.courses.CourseDAO) Enumeration(java.util.Enumeration) UserUtils(fi.otavanopisto.pyramus.framework.UserUtils) Date(java.util.Date) BasicCourseResource(fi.otavanopisto.pyramus.domainmodel.courses.BasicCourseResource) OtherCost(fi.otavanopisto.pyramus.domainmodel.courses.OtherCost) JSONRequestContext(fi.internetix.smvc.controllers.JSONRequestContext) GradeCourseResource(fi.otavanopisto.pyramus.domainmodel.courses.GradeCourseResource) SmvcRuntimeException(fi.internetix.smvc.SmvcRuntimeException) OtherCostDAO(fi.otavanopisto.pyramus.dao.courses.OtherCostDAO) BigDecimal(java.math.BigDecimal) Vector(java.util.Vector) CourseComponentResourceDAO(fi.otavanopisto.pyramus.dao.courses.CourseComponentResourceDAO) CourseParticipationTypeDAO(fi.otavanopisto.pyramus.dao.courses.CourseParticipationTypeDAO) Locale(java.util.Locale) Map(java.util.Map) Tag(fi.otavanopisto.pyramus.domainmodel.base.Tag) CourseEducationTypeDAO(fi.otavanopisto.pyramus.dao.base.CourseEducationTypeDAO) CourseEducationSubtype(fi.otavanopisto.pyramus.domainmodel.base.CourseEducationSubtype) CourseOptionality(fi.otavanopisto.pyramus.domainmodel.base.CourseOptionality) UserRole(fi.otavanopisto.pyramus.framework.UserRole) CourseDescriptionCategory(fi.otavanopisto.pyramus.domainmodel.courses.CourseDescriptionCategory) CourseSignupStudentGroup(fi.otavanopisto.pyramus.domainmodel.courses.CourseSignupStudentGroup) CourseStaffMemberRoleDAO(fi.otavanopisto.pyramus.dao.courses.CourseStaffMemberRoleDAO) CourseStudentDAO(fi.otavanopisto.pyramus.dao.courses.CourseStudentDAO) StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) StaleObjectStateException(org.hibernate.StaleObjectStateException) CourseSignupStudentGroupDAO(fi.otavanopisto.pyramus.dao.courses.CourseSignupStudentGroupDAO) DuplicateCourseStudentException(fi.otavanopisto.pyramus.exception.DuplicateCourseStudentException) Set(java.util.Set) GradeCourseResourceDAO(fi.otavanopisto.pyramus.dao.courses.GradeCourseResourceDAO) PyramusStatusCode(fi.otavanopisto.pyramus.framework.PyramusStatusCode) Messages(fi.otavanopisto.pyramus.I18N.Messages) CourseEducationType(fi.otavanopisto.pyramus.domainmodel.base.CourseEducationType) Objects(java.util.Objects) List(java.util.List) CourseParticipationType(fi.otavanopisto.pyramus.domainmodel.courses.CourseParticipationType) CourseEnrolmentTypeDAO(fi.otavanopisto.pyramus.dao.courses.CourseEnrolmentTypeDAO) Module(fi.otavanopisto.pyramus.domainmodel.modules.Module) StudentCourseResourceDAO(fi.otavanopisto.pyramus.dao.courses.StudentCourseResourceDAO) EducationType(fi.otavanopisto.pyramus.domainmodel.base.EducationType) CourseDescriptionDAO(fi.otavanopisto.pyramus.dao.courses.CourseDescriptionDAO) CourseStudent(fi.otavanopisto.pyramus.domainmodel.courses.CourseStudent) StudentDAO(fi.otavanopisto.pyramus.dao.students.StudentDAO) CurriculumDAO(fi.otavanopisto.pyramus.dao.base.CurriculumDAO) StaffMemberDAO(fi.otavanopisto.pyramus.dao.users.StaffMemberDAO) Resource(fi.otavanopisto.pyramus.domainmodel.resources.Resource) CourseStaffMemberRole(fi.otavanopisto.pyramus.domainmodel.courses.CourseStaffMemberRole) CourseState(fi.otavanopisto.pyramus.domainmodel.courses.CourseState) CourseStateDAO(fi.otavanopisto.pyramus.dao.courses.CourseStateDAO) CourseDescription(fi.otavanopisto.pyramus.domainmodel.courses.CourseDescription) ResourceType(fi.otavanopisto.pyramus.domainmodel.resources.ResourceType) HashMap(java.util.HashMap) Currency(java.util.Currency) DefaultsDAO(fi.otavanopisto.pyramus.dao.base.DefaultsDAO) Course(fi.otavanopisto.pyramus.domainmodel.courses.Course) CourseSignupStudyProgrammeDAO(fi.otavanopisto.pyramus.dao.courses.CourseSignupStudyProgrammeDAO) CourseTypeDAO(fi.otavanopisto.pyramus.dao.courses.CourseTypeDAO) StudentCourseResource(fi.otavanopisto.pyramus.domainmodel.courses.StudentCourseResource) MonetaryAmount(fi.otavanopisto.pyramus.persistence.usertypes.MonetaryAmount) EducationSubtype(fi.otavanopisto.pyramus.domainmodel.base.EducationSubtype) HashSet(java.util.HashSet) EducationalTimeUnitDAO(fi.otavanopisto.pyramus.dao.base.EducationalTimeUnitDAO) Curriculum(fi.otavanopisto.pyramus.domainmodel.base.Curriculum) Student(fi.otavanopisto.pyramus.domainmodel.students.Student) BasicCourseResourceDAO(fi.otavanopisto.pyramus.dao.courses.BasicCourseResourceDAO) CourseComponent(fi.otavanopisto.pyramus.domainmodel.courses.CourseComponent) EducationalTimeUnit(fi.otavanopisto.pyramus.domainmodel.base.EducationalTimeUnit) CourseStaffMemberDAO(fi.otavanopisto.pyramus.dao.courses.CourseStaffMemberDAO) JSONRequestController(fi.otavanopisto.pyramus.framework.JSONRequestController) SubjectDAO(fi.otavanopisto.pyramus.dao.base.SubjectDAO) Room(fi.otavanopisto.pyramus.domainmodel.accommodation.Room) Role(fi.otavanopisto.pyramus.domainmodel.users.Role) TagDAO(fi.otavanopisto.pyramus.dao.base.TagDAO) StudyProgrammeDAO(fi.otavanopisto.pyramus.dao.base.StudyProgrammeDAO) ResourceDAO(fi.otavanopisto.pyramus.dao.resources.ResourceDAO) OrganizationDAO(fi.otavanopisto.pyramus.dao.base.OrganizationDAO) CourseComponentResource(fi.otavanopisto.pyramus.domainmodel.courses.CourseComponentResource) CourseType(fi.otavanopisto.pyramus.domainmodel.courses.CourseType) EducationSubtypeDAO(fi.otavanopisto.pyramus.dao.base.EducationSubtypeDAO) EducationTypeDAO(fi.otavanopisto.pyramus.dao.base.EducationTypeDAO) ModuleDAO(fi.otavanopisto.pyramus.dao.modules.ModuleDAO) CourseEnrolmentType(fi.otavanopisto.pyramus.domainmodel.courses.CourseEnrolmentType) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup) StudyProgramme(fi.otavanopisto.pyramus.domainmodel.base.StudyProgramme) CourseComponentDAO(fi.otavanopisto.pyramus.dao.courses.CourseComponentDAO) Subject(fi.otavanopisto.pyramus.domainmodel.base.Subject) CourseDescriptionCategoryDAO(fi.otavanopisto.pyramus.dao.courses.CourseDescriptionCategoryDAO) CourseEducationSubtypeDAO(fi.otavanopisto.pyramus.dao.base.CourseEducationSubtypeDAO) DAOFactory(fi.otavanopisto.pyramus.dao.DAOFactory) StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) CourseSignupStudentGroupDAO(fi.otavanopisto.pyramus.dao.courses.CourseSignupStudentGroupDAO) SmvcRuntimeException(fi.internetix.smvc.SmvcRuntimeException) CourseSignupStudentGroupDAO(fi.otavanopisto.pyramus.dao.courses.CourseSignupStudentGroupDAO) CourseSignupStudentGroup(fi.otavanopisto.pyramus.domainmodel.courses.CourseSignupStudentGroup) CourseSignupStudentGroup(fi.otavanopisto.pyramus.domainmodel.courses.CourseSignupStudentGroup) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup) HashSet(java.util.HashSet)

Example 2 with StudentGroup

use of fi.otavanopisto.pyramus.domainmodel.students.StudentGroup in project pyramus by otavanopisto.

the class StudentGroupsAutoCompleteBinaryRequestController method process.

/**
 * Processes a binary request.
 * The request should contain the following parameters:
 * <dl>
 *   <dt><code>text</code></dt>
 *   <dd>Already typed characters.</dd>
 * </dl>
 *
 * @param binaryRequestContext The context of the binary request.
 */
public void process(BinaryRequestContext binaryRequestContext) {
    StudentGroupDAO studentGroupDAO = DAOFactory.getInstance().getStudentGroupDAO();
    StaffMemberDAO staffMemberDAO = DAOFactory.getInstance().getStaffMemberDAO();
    String text = binaryRequestContext.getString("text");
    StringBuilder resultBuilder = new StringBuilder();
    resultBuilder.append("<ul>");
    if (!StringUtils.isBlank(text)) {
        text = QueryParser.escape(StringUtils.trim(text)) + '*';
        StaffMember loggedUser = staffMemberDAO.findById(binaryRequestContext.getLoggedUserId());
        Organization organization = UserUtils.canAccessAllOrganizations(loggedUser) ? null : loggedUser.getOrganization();
        List<StudentGroup> studentGroups = studentGroupDAO.searchStudentGroupsBasic(100, 0, organization, text).getResults();
        for (StudentGroup studentGroup : studentGroups) {
            addResult(resultBuilder, studentGroup);
        }
    }
    resultBuilder.append("</ul>");
    try {
        binaryRequestContext.setResponseContent(resultBuilder.toString().getBytes("UTF-8"), "text/html;charset=UTF-8");
    } catch (UnsupportedEncodingException e) {
        throw new SmvcRuntimeException(e);
    }
}
Also used : StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) StaffMemberDAO(fi.otavanopisto.pyramus.dao.users.StaffMemberDAO) Organization(fi.otavanopisto.pyramus.domainmodel.base.Organization) UnsupportedEncodingException(java.io.UnsupportedEncodingException) SmvcRuntimeException(fi.internetix.smvc.SmvcRuntimeException) StaffMember(fi.otavanopisto.pyramus.domainmodel.users.StaffMember) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup)

Example 3 with StudentGroup

use of fi.otavanopisto.pyramus.domainmodel.students.StudentGroup in project pyramus by otavanopisto.

the class ManageStudentGroupContactEntriesViewController method process.

/**
 * Processes the page request.
 *
 * In parameters
 * - person
 *
 * Page parameters
 * - person - Person object
 * - contactEntries - List of StudentContactLogEntry objects
 *
 * @param pageRequestContext pageRequestContext
 */
public void process(PageRequestContext pageRequestContext) {
    StudentGroupContactLogEntryDAO logEntryDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryDAO();
    StudentGroupContactLogEntryCommentDAO entryCommentDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryCommentDAO();
    StudentGroupDAO studentGroupDAO = DAOFactory.getInstance().getStudentGroupDAO();
    Long studentGroupId = pageRequestContext.getLong("studentgroup");
    StudentGroup studentGroup = studentGroupDAO.findById(studentGroupId);
    pageRequestContext.getRequest().setAttribute("studentGroup", studentGroup);
    final Map<Long, List<StudentGroupContactLogEntryComment>> contactEntryComments = new HashMap<>();
    List<StudentGroupContactLogEntry> contactLogEntries = logEntryDAO.listByStudentGroup(studentGroup);
    for (int j = 0; j < contactLogEntries.size(); j++) {
        StudentGroupContactLogEntry entry = contactLogEntries.get(j);
        List<StudentGroupContactLogEntryComment> listComments = entryCommentDAO.listByEntry(entry);
        Collections.sort(listComments, new Comparator<StudentGroupContactLogEntryComment>() {

            public int compare(StudentGroupContactLogEntryComment o1, StudentGroupContactLogEntryComment o2) {
                Date d1 = o1.getCommentDate();
                Date d2 = o2.getCommentDate();
                int val = d1 == null ? d2 == null ? 0 : 1 : d2 == null ? -1 : d1.compareTo(d2);
                if (val == 0)
                    return o1.getId().compareTo(o2.getId());
                else
                    return val;
            }
        });
        contactEntryComments.put(entry.getId(), listComments);
    }
    // Now we can sort entries based on date of entry and/or dates of the comments on the entry
    Collections.sort(contactLogEntries, new Comparator<StudentGroupContactLogEntry>() {

        private Date getDateForEntry(StudentGroupContactLogEntry entry) {
            Date d = entry.getEntryDate();
            List<StudentGroupContactLogEntryComment> comments = contactEntryComments.get(entry.getId());
            for (int i = 0; i < comments.size(); i++) {
                StudentGroupContactLogEntryComment comment = comments.get(i);
                if (d == null) {
                    d = comment.getCommentDate();
                } else {
                    if (d.before(comment.getCommentDate()))
                        d = comment.getCommentDate();
                }
            }
            return d;
        }

        public int compare(StudentGroupContactLogEntry o1, StudentGroupContactLogEntry o2) {
            Date d1 = getDateForEntry(o1);
            Date d2 = getDateForEntry(o2);
            int val = d1 == null ? d2 == null ? 0 : 1 : d2 == null ? -1 : d2.compareTo(d1);
            if (val == 0)
                return o2.getId().compareTo(o1.getId());
            else
                return val;
        }
    });
    pageRequestContext.getRequest().setAttribute("contactEntries", contactLogEntries);
    pageRequestContext.getRequest().setAttribute("contactEntryComments", contactEntryComments);
    pageRequestContext.setIncludeJSP("/templates/students/managestudentgroupcontactentries.jsp");
}
Also used : HashMap(java.util.HashMap) StudentGroupContactLogEntry(fi.otavanopisto.pyramus.domainmodel.students.StudentGroupContactLogEntry) Date(java.util.Date) StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) StudentGroupContactLogEntryDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupContactLogEntryDAO) List(java.util.List) StudentGroupContactLogEntryCommentDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupContactLogEntryCommentDAO) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup) StudentGroupContactLogEntryComment(fi.otavanopisto.pyramus.domainmodel.students.StudentGroupContactLogEntryComment)

Example 4 with StudentGroup

use of fi.otavanopisto.pyramus.domainmodel.students.StudentGroup in project pyramus by otavanopisto.

the class ViewStudentGroupViewController method process.

/**
 * Processes the page request by including the corresponding JSP page to the response.
 *
 * @param pageRequestContext Page request context
 */
public void process(PageRequestContext pageRequestContext) {
    StudentGroupDAO studentGroupDAO = DAOFactory.getInstance().getStudentGroupDAO();
    StudentGroupContactLogEntryDAO contactLogEntryDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryDAO();
    StudentGroupContactLogEntryCommentDAO contactLogEntryCommentDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryCommentDAO();
    // The student group to be edited
    StudentGroup studentGroup = studentGroupDAO.findById(pageRequestContext.getLong("studentgroup"));
    pageRequestContext.getRequest().setAttribute("studentGroup", studentGroup);
    List<StudentGroupStudent> studentGroupStudents = new ArrayList<>(studentGroup.getStudents());
    Collections.sort(studentGroupStudents, new Comparator<StudentGroupStudent>() {

        @Override
        public int compare(StudentGroupStudent o1, StudentGroupStudent o2) {
            int cmp = o1.getStudent().getLastName().compareToIgnoreCase(o2.getStudent().getLastName());
            if (cmp == 0)
                cmp = o1.getStudent().getFirstName().compareToIgnoreCase(o2.getStudent().getFirstName());
            return cmp;
        }
    });
    final Map<Long, List<StudentGroupContactLogEntryComment>> contactEntryComments = new HashMap<>();
    List<StudentGroupContactLogEntry> contactLogEntries = contactLogEntryDAO.listByStudentGroup(studentGroup);
    for (int j = 0; j < contactLogEntries.size(); j++) {
        StudentGroupContactLogEntry entry = contactLogEntries.get(j);
        List<StudentGroupContactLogEntryComment> listComments = contactLogEntryCommentDAO.listByEntry(entry);
        Collections.sort(listComments, new Comparator<StudentGroupContactLogEntryComment>() {

            public int compare(StudentGroupContactLogEntryComment o1, StudentGroupContactLogEntryComment o2) {
                Date d1 = o1.getCommentDate();
                Date d2 = o2.getCommentDate();
                int val = d1 == null ? d2 == null ? 0 : 1 : d2 == null ? -1 : d1.compareTo(d2);
                if (val == 0)
                    return o1.getId().compareTo(o2.getId());
                else
                    return val;
            }
        });
        contactEntryComments.put(entry.getId(), listComments);
    }
    // Now we can sort entries based on date of entry and/or dates of the comments on the entry
    Collections.sort(contactLogEntries, new Comparator<StudentGroupContactLogEntry>() {

        private Date getDateForEntry(StudentGroupContactLogEntry entry) {
            Date d = entry.getEntryDate();
            List<StudentGroupContactLogEntryComment> comments = contactEntryComments.get(entry.getId());
            for (int i = 0; i < comments.size(); i++) {
                StudentGroupContactLogEntryComment comment = comments.get(i);
                if (d == null) {
                    d = comment.getCommentDate();
                } else {
                    if (d.before(comment.getCommentDate()))
                        d = comment.getCommentDate();
                }
            }
            return d;
        }

        public int compare(StudentGroupContactLogEntry o1, StudentGroupContactLogEntry o2) {
            Date d1 = getDateForEntry(o1);
            Date d2 = getDateForEntry(o2);
            int val = d1 == null ? d2 == null ? 0 : 1 : d2 == null ? -1 : d2.compareTo(d1);
            if (val == 0)
                return o2.getId().compareTo(o1.getId());
            else
                return val;
        }
    });
    pageRequestContext.getRequest().setAttribute("contactEntries", contactLogEntries);
    pageRequestContext.getRequest().setAttribute("contactEntryComments", contactEntryComments);
    pageRequestContext.getRequest().setAttribute("studentGroupStudents", studentGroupStudents);
    pageRequestContext.setIncludeJSP("/templates/students/viewstudentgroup.jsp");
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) StudentGroupContactLogEntry(fi.otavanopisto.pyramus.domainmodel.students.StudentGroupContactLogEntry) Date(java.util.Date) StudentGroupStudent(fi.otavanopisto.pyramus.domainmodel.students.StudentGroupStudent) StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) StudentGroupContactLogEntryDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupContactLogEntryDAO) ArrayList(java.util.ArrayList) List(java.util.List) StudentGroupContactLogEntryCommentDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupContactLogEntryCommentDAO) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup) StudentGroupContactLogEntryComment(fi.otavanopisto.pyramus.domainmodel.students.StudentGroupContactLogEntryComment)

Example 5 with StudentGroup

use of fi.otavanopisto.pyramus.domainmodel.students.StudentGroup in project pyramus by otavanopisto.

the class ViewStudentGroupViewController method checkAccess.

@Override
protected boolean checkAccess(RequestContext requestContext) {
    StaffMemberDAO staffMemberDAO = DAOFactory.getInstance().getStaffMemberDAO();
    StudentGroupDAO studentGroupDAO = DAOFactory.getInstance().getStudentGroupDAO();
    StaffMember loggedUser = staffMemberDAO.findById(requestContext.getLoggedUserId());
    StudentGroup studentGroup = studentGroupDAO.findById(requestContext.getLong("studentgroup"));
    return Permissions.instance().hasEnvironmentPermission(loggedUser, PyramusViewPermissions.VIEW_STUDENTGROUP) && UserUtils.canAccessOrganization(loggedUser, studentGroup.getOrganization());
}
Also used : StaffMemberDAO(fi.otavanopisto.pyramus.dao.users.StaffMemberDAO) StudentGroupDAO(fi.otavanopisto.pyramus.dao.students.StudentGroupDAO) StaffMember(fi.otavanopisto.pyramus.domainmodel.users.StaffMember) StudentGroup(fi.otavanopisto.pyramus.domainmodel.students.StudentGroup)

Aggregations

StudentGroup (fi.otavanopisto.pyramus.domainmodel.students.StudentGroup)46 RESTPermit (fi.otavanopisto.pyramus.rest.annotation.RESTPermit)18 Path (javax.ws.rs.Path)18 StudentGroupDAO (fi.otavanopisto.pyramus.dao.students.StudentGroupDAO)16 StudentGroupStudent (fi.otavanopisto.pyramus.domainmodel.students.StudentGroupStudent)16 StudentGroupUser (fi.otavanopisto.pyramus.domainmodel.students.StudentGroupUser)16 StaffMember (fi.otavanopisto.pyramus.domainmodel.users.StaffMember)15 User (fi.otavanopisto.pyramus.domainmodel.users.User)15 Student (fi.otavanopisto.pyramus.domainmodel.students.Student)14 StaffMemberDAO (fi.otavanopisto.pyramus.dao.users.StaffMemberDAO)12 Organization (fi.otavanopisto.pyramus.domainmodel.base.Organization)11 ArrayList (java.util.ArrayList)11 Date (java.util.Date)11 CourseStudent (fi.otavanopisto.pyramus.domainmodel.courses.CourseStudent)8 HashMap (java.util.HashMap)8 EntityManager (javax.persistence.EntityManager)8 GET (javax.ws.rs.GET)6 SmvcRuntimeException (fi.internetix.smvc.SmvcRuntimeException)5 Tag (fi.otavanopisto.pyramus.domainmodel.base.Tag)5 OrganizationDAO (fi.otavanopisto.pyramus.dao.base.OrganizationDAO)4