Package in.partake.model.dto

Examples of in.partake.model.dto.EventActivity


public class EventActivityTestDataProvider extends TestDataProvider<EventActivity> {
    @Override
    public EventActivity create(long pkNumber, String pkSalt, int objNumber) {
        UUID uuid = new UUID(pkNumber, pkSalt.hashCode());
        return new EventActivity(uuid.toString(), "eventId", "title", "content", new DateTime(0));
    }
View Full Code Here


    }

    @Override
    public List<EventActivity> createSamples() {
        List<EventActivity> array = new ArrayList<EventActivity>();
        array.add(new EventActivity(new UUID(0, 0).toString(), "eventId", "title", "content", new DateTime(0)));
        array.add(new EventActivity(new UUID(0, 1).toString(), "eventId", "title", "content", new DateTime(0)));
        array.add(new EventActivity(new UUID(0, 0).toString(), "eventId1", "title", "content", new DateTime(0)));
        array.add(new EventActivity(new UUID(0, 0).toString(), "eventId", "title1", "content", new DateTime(0)));
        array.add(new EventActivity(new UUID(0, 0).toString(), "eventId", "title", "content1", new DateTime(0)));
        array.add(new EventActivity(new UUID(0, 0).toString(), "eventId", "title", "content", new DateTime(1)));
        return array;
    }
View Full Code Here

    }

    @Override
    public EventActivity create(long pkNumber, String pkSalt, int objNumber) {
        UUID uuid = new UUID(pkNumber, ("activity" + pkSalt).hashCode());
        return new EventActivity(uuid.toString(), "eventId", "title" + objNumber, "content", new DateTime(objNumber % 10));
    }
View Full Code Here

            protected Void doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
                String eventId = "eventId-findByEventId-0-" + System.currentTimeMillis();

                con.beginTransaction();
                for (int i = 0; i < 10; ++i) {
                    EventActivity activity = new EventActivity(dao.getFreshId(con), eventId, "title-" + i, "content", new DateTime(i));
                    dao.put(con, activity);
                }
                con.commit();

                List<EventActivity> activities = dao.findByEventId(con, eventId, 10);
View Full Code Here



                con.beginTransaction();
                for (int i = 0; i < 10; ++i) {
                    EventActivity activity = new EventActivity(dao.getFreshId(con), eventId1, "title-" + i, "content", new DateTime(i));
                    dao.put(con, activity);
                }
                for (int i = 0; i < 10; ++i) {
                    EventActivity activity = new EventActivity(dao.getFreshId(con), eventId2, "title-" + i, "content", new DateTime(i));
                    dao.put(con, activity);
                }
                con.commit();

                List<EventActivity> activities1 = dao.findByEventId(con, eventId1, 10);
View Full Code Here

                String eventId1 = "eventId-findByEventId-1-" + System.currentTimeMillis();
                String eventId2 = "eventId-findByEventId-2-" + System.currentTimeMillis();

                con.beginTransaction();
                for (int i = 0; i < 100; ++i) {
                    EventActivity activity = new EventActivity(dao.getFreshId(con), eventId1, "title-" + i, "content", new DateTime(i));
                    dao.put(con, activity);
                }
                con.commit();
                con.beginTransaction();
                for (int i = 0; i < 100; ++i) {
                    EventActivity activity = new EventActivity(dao.getFreshId(con), eventId2, "title-" + i, "content", new DateTime(i));
                    dao.put(con, activity);
                }
                con.commit();

View Full Code Here

            case NOT_ENROLLED:  title = user.getTwitterScreenName() + " さんはもう参加していません"; break;
            default:            title = user.getTwitterScreenName() + " さんが不明なステータスになっています"; break; // TODO: :-P
            }

            String content = String.format("<p>詳細は <a href=\"%s\">%s</a> をごらんください。</p>", event.getEventURL(), event.getEventURL());
            eaa.put(con, new EventActivity(eaa.getFreshId(con), eventId, title, content, TimeUtil.getCurrentDateTime()));
        }

        daos.getEnrollmentAccess().put(con, newEnrollment);
    }
View Full Code Here

        // TODO: コメント消したときにこれも消したいか? まずいコメントが feed され続けるのは問題となりうるか?
        IEventActivityAccess eaa = daos.getEventActivityAccess();
        UserEx user = UserDAOFacade.getUserEx(con, daos, commentEmbryo.getUserId());
        String title = user.getTwitterScreenName() + " さんがコメントを投稿しました";
        String content = commentEmbryo.getComment();
        eaa.put(con, new EventActivity(eaa.getFreshId(con), commentEmbryo.getEventId(), title, content, commentEmbryo.getCreatedAt()));

        return null;
    }
View Full Code Here

        event.setDraft(false);
        daos.getEventAccess().put(con, event);

        // Event Activity に挿入
        IEventActivityAccess eaa = daos.getEventActivityAccess();
        EventActivity activity = new EventActivity(eaa.getFreshId(con), event.getId(), "イベントが更新されました : " + event.getTitle(), event.getDescription(), event.getCreatedAt());
        eaa.put(con, activity);

        // さらに、twitter bot がつぶやく (private の場合はつぶやかない)
        if (event.isSearchable())
            EventDAOFacade.tweetNewEventArrival(con, daos, event);
View Full Code Here

        }

        // Event Activity にも挿入
        {
            IEventActivityAccess eaa = daos.getEventActivityAccess();
            EventActivity activity = new EventActivity(eaa.getFreshId(con), eventEmbryo.getId(), "イベントが登録されました : " + eventEmbryo.getTitle(), eventEmbryo.getDescription(), eventEmbryo.getCreatedAt());
            eaa.put(con, activity);
        }

        // さらに、twitter bot がつぶやく (private の場合はつぶやかない)
        if (eventEmbryo.isSearchable())
View Full Code Here

TOP

Related Classes of in.partake.model.dto.EventActivity

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.