Package com.apress.progwt.client.domain

Examples of com.apress.progwt.client.domain.School


    public PostsList getForum(ForumTopic forumTopic, int start, int max) {
        if (forumTopic instanceof User) {
            User user = (User) forumTopic;
            return schoolDAO.getUserThreads(user.getId(), start, max);
        } else if (forumTopic instanceof School) {
            School school = (School) forumTopic;
            return schoolDAO.getSchoolThreads(school.getId(), start, max);
        } else if (forumTopic instanceof ForumPost) {
            ForumPost post = (ForumPost) forumTopic;
            return schoolDAO.getPostsForThread(post, start, max);
        } else if (forumTopic instanceof RecentForumPostTopic) {
            return schoolDAO.getRecentForumPosts(start, max);
View Full Code Here


        return ranked;
    }

    public School getSchoolDetails(String schoolname) {

        School school = schoolDAO.getSchoolFromName(schoolname);

        incrementSchoolPopularity(school);

        return school;
    }
View Full Code Here

            if (obj instanceof User) {
                User usr = (User) obj;
                res.getUsers().add(usr);
            }
            if (obj instanceof School) {
                School sch = (School) obj;
                res.getSchools().add(sch);
            }
            if (obj instanceof ForumPost) {
                ForumPost fp = (ForumPost) obj;
                res.getForumPosts().add(fp);
View Full Code Here

    }

    private void process(ForumCommand fc) {
        currentCommand = fc;
        if (fc.getType().equals("School")) {
            School s = new School(fc.getId());
            gotoSchool(s, fc.getStart(), fc.isCreate());
        } else if (fc.getType().equals("SchoolForumPost")) {
            ForumPost fp = new SchoolForumPost();
            fp.setId(fc.getId());
            gotoThread(fp, fc.getStart(), fc.isCreate());
View Full Code Here

    }

    public void testBigSave() {

        School sc = schoolService.getSchoolDetails("Dartmouth College");
        assertNotNull(sc);

        User currentUser = getUser();

        assertEquals(0, currentUser.getSchoolRankings().size());
View Full Code Here

        return savedUser;
    }

    public void testBigSaveAgain() {
        log.debug("\n\nSave Again\n\n");
        School sc = schoolService.getSchoolDetails("Dartmouth College");
        assertNotNull(sc);

        User currentUser = getUser();
        assertEquals(0, currentUser.getSchoolRankings().size());
View Full Code Here

    }

    public void testSaveSchoolRanking() throws SiteException {
        log.debug("\n\nSaveSchoolRankings\n\n");
        School dart = schoolService.getSchoolDetails("Dartmouth College");
        School harvard = schoolService
                .getSchoolDetails("Harvard University");
        School yale = schoolService.getSchoolDetails("Yale University");
        assertNotNull(dart);
        assertNotNull(harvard);
        assertNotNull(yale);

        // Save in order to Dart/Harvard/Yale
View Full Code Here

    }

    public void testSaveSchoolRankingWithDelete() throws SiteException {

        School dart = schoolService.getSchoolDetails("Dartmouth College");
        School harvard = schoolService
                .getSchoolDetails("Harvard University");
        School yale = schoolService.getSchoolDetails("Yale University");

        // Save in order to Dart/Harvard/Yale
        SaveSchoolRankCommand comm = new SaveSchoolRankCommand(dart,
                getUser(), 0);
        executeWithToken(comm, false);
View Full Code Here

                .getSortOrder());
    }

    public void testSaveProcessTypes() throws SiteException {
        log.debug("\ntestSaveProcessTypes\n\n");
        School dart = schoolService.getSchoolDetails("Dartmouth College");
        School harvard = schoolService
                .getSchoolDetails("Harvard University");
        School yale = schoolService.getSchoolDetails("Yale University");

        // Save in order to Dart/Harvard/Yale
        SaveSchoolRankCommand comm = new SaveSchoolRankCommand(dart,
                getUser(), 0);
        executeWithToken(comm, false);
View Full Code Here

    }

    public void testSaveRatingTypes() throws SiteException {
        log.debug("\n\nSaveratingTypes\n\n");
        School dart = schoolService.getSchoolDetails("Dartmouth College");
        School harvard = schoolService
                .getSchoolDetails("Harvard University");
        School yale = schoolService.getSchoolDetails("Yale University");

        // Save in order to Dart/Harvard/Yale
        SaveSchoolRankCommand comm = new SaveSchoolRankCommand(dart,
                getUser(), 0);
        executeWithToken(comm, false);
View Full Code Here

TOP

Related Classes of com.apress.progwt.client.domain.School

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.