Package in.partake.model.dto

Examples of in.partake.model.dto.EventTicket


            Event event = daos.getEventAccess().find(con, enrollment.getEventId());
            if (event == null)
                continue;

            EventTicket ticket = daos.getEventTicketAccess().find(con, enrollment.getTicketId());
            if (ticket == null)
                continue;

            CalculatedEnrollmentStatus calculatedEnrollmentStatus = EnrollmentDAOFacade.calculateEnrollmentStatus(con, daos, userId, ticket, event);
            TicketAndStatus status = new TicketAndStatus(ticket, event, calculatedEnrollmentStatus);
View Full Code Here


        for (int i = 0; i < limit && i + offset < filtered.size(); ++i) {
            UserTicket userTicket = filtered.get(i + offset).getFirst();
            Event event = filtered.get(i + offset).getSecond();

            EventTicket ticket = daos.getEventTicketAccess().find(con, userTicket.getTicketId());
            if (ticket == null)
                continue;

            CalculatedEnrollmentStatus calculatedEnrollmentStatus = EnrollmentDAOFacade.calculateEnrollmentStatus(con, daos, userId, ticket, event);
            TicketAndStatus status = new TicketAndStatus(ticket, event, calculatedEnrollmentStatus);
View Full Code Here

            Event event = daos.getEventAccess().find(con, enrollment.getEventId());
            if (event == null)
                continue;

            EventTicket ticket = daos.getEventTicketAccess().find(con, enrollment.getTicketId());
            if (ticket == null)
                continue;

            CalculatedEnrollmentStatus calculatedEnrollmentStatus = EnrollmentDAOFacade.calculateEnrollmentStatus(con, daos, userId, ticket, event);
            TicketAndStatus status = new TicketAndStatus(ticket, event, calculatedEnrollmentStatus);
View Full Code Here

        if (!EventParticipationListPermission.check(event, user))
            throw new PartakeException(UserErrorCode.FORBIDDEN_EVENT_ATTENDANT_EDIT);

        tickets = daos.getEventTicketAccess().findEventTicketsByEventId(con, eventId);
        for (int i = 0; i < tickets.size(); ++i) {
            EventTicket ticket = tickets.get(i);
            List<UserTicketEx> participations = EnrollmentDAOFacade.getEnrollmentExs(con, daos, ticket, event);
            EventTicketHolderList list = ticket.calculateParticipationList(event, participations);
            ticketAndHolders.add(new Pair<EventTicket, EventTicketHolderList>(ticket, list));

            for (UserTicketEx participation : list.getEnrolledParticipations()) {
                if (!userTicketInfoMap.containsKey(participation.getUserId())) {
                    userTicketInfoMap.put(participation.getUserId(), Arrays.asList(new String[tickets.size()]));
View Full Code Here

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        CSVWriter writer = new CSVWriter(new OutputStreamWriter(baos, Charset.forName("UTF-8")));

        writeHeader(writer, event);
        for (int i = 0; i < ticketAndHolders.size(); ++i) {
            EventTicket ticket = ticketAndHolders.get(i).getFirst();
            EventTicketHolderList list = ticketAndHolders.get(i).getSecond();
            writeTicket(writer, event, ticket, list, i, userTicketInfoMap);
        }

        writer.flush();
View Full Code Here

            Logger.warn("sendTwitterMessage : envelope id " + envelope.getId() + " could not be sent : No access token");
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }

        EventTicket ticket = daos.getEventTicketAccess().find(con, notification.getTicketId());
        if (ticket == null) {
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }

        Event event = daos.getEventAccess().find(con, ticket.getEventId());
        if (event == null) {
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }
View Full Code Here

        this.userId = userId;
    }

    @Override
    protected Void doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
        EventTicket ticket = daos.getEventTicketAccess().find(con, ticketId);
        if (ticket == null)
            throw new PartakeException(UserErrorCode.INVALID_TICKET_ID);

        IEventAccess eventDao = daos.getEventAccess();
        Event event = eventDao.find(con, ticket.getEventId());
        if (event == null)
            throw new PartakeException(UserErrorCode.INVALID_TICKET_ID);

        if (!EventEditParticipantsPermission.check(event, user))
            throw new PartakeException(UserErrorCode.FORBIDDEN_EVENT_ATTENDANT_EDIT);
View Full Code Here

        // TODO: We only consider the first 1000 entries of enrollments due to memory limit.
        List<UserTicket> enrollments =
                daos.getEnrollmentAccess().findByUserId(con, user.getId(), 0, 1000);
        for (UserTicket enrollment : enrollments) {
            // TODO: Event should be search-able by ticket-id.
            EventTicket ticket = daos.getEventTicketAccess().find(con, enrollment.getTicketId());
            Event event = daos.getEventAccess().find(con, ticket.getEventId());
            if (event == null)
                continue;
            CalendarUtil.addToCalendar(calendar, event);
        }
View Full Code Here

import org.codehaus.jackson.node.ObjectNode;

class EntityEventTicketMapper extends Postgres9EntityDataMapper<EventTicket> {
  public EventTicket map(ObjectNode obj) {
        return new EventTicket(obj).freeze();
    }
View Full Code Here

TOP

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

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.