Package in.partake.base

Examples of in.partake.base.DateTime


    @Override
    public List<EventTicket> createSamples() {
        List<EventTicket> list = new ArrayList<EventTicket>();

        list.add(new EventTicket(new UUID(0, 0), "eventId", 0"name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 1), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId1", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 1, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name1", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name1", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name1", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.FROM_CUSTOM_DAY, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 1, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, new DateTime(0L), TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_AFTER_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 1, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, new DateTime(0L), TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.NONFREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 1, TicketAmountType.UNLIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.LIMITED, 0, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 1, new DateTime(0), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(1), null));
        list.add(new EventTicket(new UUID(0, 0), "eventId", 0, "name", TicketApplicationStart.ANYTIME, 0, null, TicketApplicationEnd.TILL_TIME_BEFORE_EVENT, 0, null, TicketReservationEnd.TILL_NHOUR_BEFORE, 0, null, TicketPriceType.FREE, 0, TicketAmountType.UNLIMITED, 0, new DateTime(0), new DateTime(0L)));

        return list;
    }
View Full Code Here


    Event[] samples;

    @Before
    public void createSamples() {
        DateTime now = TimeUtil.getCurrentDateTime();
        samples = new Event[] {
                new Event("id", "title", "summary", "category",
                        now, now, "url", "place",
                        "address", "description", "#hashTag", "ownerId",
                        "foreImageId", "backImageId", "passcode", false,
View Full Code Here

    public void testToJsonWhenBeginDateExistsAndEndDateIsNull() {
        TimeZone defaultTimeZone = TimeZone.getDefault();
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Tokyo"));
        try {
            Event event = new Event();
            event.setBeginDate(new DateTime(0L));
            ObjectNode json = event.toSafeJSON();
            Assert.assertEquals("1970-01-01 09:00", json.get("beginDate").asText());
            Assert.assertFalse(json.has("endDate"));
        } finally {
            TimeZone.setDefault(defaultTimeZone);
View Full Code Here

        return new EventActivity(t);
    }

    @Test
    public void testToCopy() {
        DateTime date = new DateTime(0L);
        EventActivity activity = new EventActivity("id", "userId", "title", "content", date);
        EventActivity copied = new EventActivity(activity);
        Assert.assertEquals(activity, copied);
        Assert.assertEquals(activity, new EventActivity("id", "userId", "title", "content", date));
View Full Code Here

    }

    private List<Pair<UUID, String>> prepareEvents(int n) throws Exception {
        List<Pair<UUID, String>> ids = new ArrayList<Pair<UUID, String>>();

        DateTime now = TimeUtil.getCurrentDateTime();
        DateTime late = new DateTime(now.getTime() + 1000 * 3600);
        String category = EventCategory.getCategories().get(0).getKey();

        for (int i = 0; i < n; ++i) {
            boolean isPrivate = i % 2 == 1;
            Event event = new Event(null, "title", "summary", category,
View Full Code Here

            UUID ticketId = ids.get(i).getFirst();
            String eventId = ids.get(i).getSecond();
            ParticipationStatus status = ParticipationStatus.ENROLLED;
            ModificationStatus modificationStatus = ModificationStatus.CHANGED;
            AttendanceStatus attendanceStatus = AttendanceStatus.UNKNOWN;
            DateTime enrolleAt = new DateTime(TimeUtil.getCurrentTime() + (ids.size() - i) * 1000);
            UserTicket enrollment = new UserTicket(null, userId, ticketId, eventId, "comment", status, modificationStatus, attendanceStatus, null, enrolleAt, enrolleAt, enrolleAt);
            userTicketIds.add(storeEnrollment(enrollment));
        }
        return userTicketIds;
    }
View Full Code Here

    public static final String UNIQUE_IDENTIFIER = "dlasjfjdlkhvfiaxh";
    public static final String JAPANESE_IDENTIFIER = "音無小鳥";

    @Override
    public Event create(long pkNumber, String pkSalt, int objNumber) {
        DateTime now = new DateTime(objNumber);
        DateTime beginDate = now;

        UUID uuid = new UUID(pkNumber, ("event" + pkSalt).hashCode());
        UUID ownerId = new UUID(objNumber, objNumber);
        Event event = new Event(uuid.toString(), "title", "summary", "category", beginDate, null,
                "url", "place", "address", "description", "hashTag", ownerId.toString(), null, null,
View Full Code Here

    }

    @Override
    public List<Event> createSamples() {
        List<Event> array = new ArrayList<Event>();
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id1", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "titl1e", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summ1ary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "ca1tegory", new DateTime(1), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(1), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "ur1l", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "pl1ace", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "addre1ss", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "descr1iption", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "ha1shTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "own1erId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "fo1reImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "bac1kImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", null, false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", true, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, null, new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), null, null, new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), new ArrayList<EnqueteQuestion>(), new DateTime(0), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(1), new DateTime(0), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(1), 0));
        array.add(new Event("id", "title", "summary", "category", new DateTime(0), new DateTime(0), "url", "place", "address", "description", "hashTag", "ownerId", "foreImageId", "backImageId", "passcode", false, new ArrayList<String>(), new ArrayList<String>(), null, new DateTime(0), new DateTime(0), 1));
        return array;
    }
View Full Code Here

    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventAccess dao = daos.getEventAccess();
        dao.truncate(con);

        DateTime now = TimeUtil.getCurrentDateTime();
        DateTime late = now.nDayAfter(1);
        String category = EventCategory.getCategories().get(0).getKey();

        dao.put(con, new Event(DEFAULT_EVENT_ID, "title", "summary", category,
                late, late, "http://www.example.com/", "place",
                "address", "description", "#hashTag", EVENT_OWNER_ID,
View Full Code Here

                for (int i = 0; i < N; ++i) {
                    boolean isPrivate = i % 8 == 0;
                    boolean draft = i % 8 == 1;
                    dao.put(con, new Event(ids.get(i), "title", "summary", "category",
                            new DateTime(i), null, "url", "place",
                            "address", "description", "#hashTag", TestDataProvider.EVENT_OWNER_ID,
                            null, null, isPrivate ? "passcode" : null, draft,
                            Collections.singletonList(TestDataProvider.EVENT_EDITOR_ID), new ArrayList<String>(), null,
                            new DateTime(i), new DateTime(i), -1));
                }

                return null;
            }
        }.execute();
View Full Code Here

TOP

Related Classes of in.partake.base.DateTime

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.