Package com.samples.portlet.eventlisting.model

Examples of com.samples.portlet.eventlisting.model.Event


  public static Event toModel(EventSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    Event model = new EventImpl();

    model.setEventId(soapModel.getEventId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setGroupId(soapModel.getGroupId());
    model.setUserId(soapModel.getUserId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setName(soapModel.getName());
    model.setDescription(soapModel.getDescription());
    model.setDate(soapModel.getDate());
    model.setLocationId(soapModel.getLocationId());

    return model;
  }
View Full Code Here


    if (!(obj instanceof Event)) {
      return false;
    }

    Event event = (Event)obj;

    long primaryKey = event.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    }
    else {
View Full Code Here

    }

    ServiceContext serviceContext = ServiceContextFactory.getInstance(
      Event.class.getName(), request);

    Event event = null;

    if (eventId <= 0) {
      event = EventServiceUtil.addEvent(
        serviceContext.getScopeGroupId(), name, description, month, day,
        year, hour, minute, locationId, serviceContext);
View Full Code Here

    Date now = new Date();

    long eventId = counterLocalService.increment(Event.class.getName());

    Event event = eventPersistence.create(eventId);

    event.setName(name);
    event.setDescription(description);

    Calendar dateCal = CalendarFactoryUtil.getCalendar(user.getTimeZone());
    dateCal.set(year, month, day, hour, minute);
    Date date = dateCal.getTime();
    event.setDate(date);

    event.setLocationId(locationId);

    event.setGroupId(groupId);
    event.setCompanyId(user.getCompanyId());
    event.setUserId(user.getUserId());
    event.setCreateDate(serviceContext.getCreateDate(now));
    event.setModifiedDate(serviceContext.getModifiedDate(now));

    super.addEvent(event);

    // Resources
View Full Code Here

  public void addEventResources(
      long eventId, boolean addGroupPermissions,
      boolean addGuestPermissions)
    throws PortalException, SystemException {

    Event event = eventPersistence.findByPrimaryKey(eventId);

    addEventResources(event, addGroupPermissions, addGuestPermissions);
  }
View Full Code Here

  public void addEventResources(
      long eventId, String[] groupPermissions, String[] guestPermissions)
    throws PortalException, SystemException {

    Event event = eventPersistence.findByPrimaryKey(eventId);

    addEventResources(event, groupPermissions, guestPermissions);
  }
View Full Code Here

  }

  public Event deleteEvent(long eventId)
    throws PortalException, SystemException {

    Event event = eventPersistence.findByPrimaryKey(eventId);

    return deleteEvent(event);
  }
View Full Code Here

    User user = userPersistence.findByPrimaryKey(userId);

    Date now = new Date();

    Event event = EventLocalServiceUtil.fetchEvent(eventId);

    event.setModifiedDate(serviceContext.getModifiedDate(now));
    event.setName(name);
    event.setDescription(description);

    Calendar dateCal = CalendarFactoryUtil.getCalendar(user.getTimeZone());
    dateCal.set(year, month, day, hour, minute);
    Date date = dateCal.getTime();
    event.setDate(date);

    event.setLocationId(locationId);

    super.updateEvent(event);

    return event;
  }
View Full Code Here

   */
  @Override
  public Event findByGroupId_First(long groupId,
    OrderByComparator orderByComparator)
    throws NoSuchEventException, SystemException {
    Event event = fetchByGroupId_First(groupId, orderByComparator);

    if (event != null) {
      return event;
    }

View Full Code Here

   */
  @Override
  public Event findByGroupId_Last(long groupId,
    OrderByComparator orderByComparator)
    throws NoSuchEventException, SystemException {
    Event event = fetchByGroupId_Last(groupId, orderByComparator);

    if (event != null) {
      return event;
    }

View Full Code Here

TOP

Related Classes of com.samples.portlet.eventlisting.model.Event

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.