Package com.liferay.socialnetworking.model

Examples of com.liferay.socialnetworking.model.MeetupsEntry


    Date now = new Date();

    long meetupsEntryId = counterLocalService.increment();

    MeetupsEntry meetupsEntry = meetupsEntryPersistence.create(
      meetupsEntryId);

    meetupsEntry.setCompanyId(user.getCompanyId());
    meetupsEntry.setUserId(user.getUserId());
    meetupsEntry.setUserName(user.getFullName());
    meetupsEntry.setCreateDate(now);
    meetupsEntry.setModifiedDate(now);
    meetupsEntry.setTitle(title);
    meetupsEntry.setDescription(description);
    meetupsEntry.setStartDate(startDate);
    meetupsEntry.setEndDate(endDate);
    meetupsEntry.setTotalAttendees(totalAttendees);
    meetupsEntry.setMaxAttendees(maxAttendees);
    meetupsEntry.setPrice(price);

    if ((thumbnail != null) && (thumbnail.length > 0)) {
      meetupsEntry.setThumbnailId(counterLocalService.increment());
    }

    meetupsEntryPersistence.update(meetupsEntry, false);

    if ((thumbnail != null) && (thumbnail.length > 0)) {
      ImageLocalServiceUtil.updateImage(
        meetupsEntry.getThumbnailId(), thumbnail);
    }

    return meetupsEntry;
  }
View Full Code Here


  }

  public void deleteMeetupsEntry(long meetupsEntryId)
    throws PortalException, SystemException {

    MeetupsEntry meetupsEntry = meetupsEntryPersistence.findByPrimaryKey(
      meetupsEntryId);

    meetupsRegistrationPersistence.removeByMeetupsEntryId(meetupsEntryId);

    ImageLocalServiceUtil.deleteImage(meetupsEntry.getThumbnailId());

    meetupsEntryPersistence.remove(meetupsEntry);
  }
View Full Code Here

    Date endDate = PortalUtil.getDate(
      endDateMonth, endDateDay, endDateYear, endDateHour,
      endDateMinute, user.getTimeZone(),
      new MeetupsEntryEndDateException());

    MeetupsEntry meetupsEntry = meetupsEntryPersistence.findByPrimaryKey(
      meetupsEntryId);

    meetupsEntry.setModifiedDate(new Date());
    meetupsEntry.setTitle(title);
    meetupsEntry.setDescription(description);
    meetupsEntry.setStartDate(startDate);
    meetupsEntry.setEndDate(endDate);
    meetupsEntry.setTotalAttendees(totalAttendees);
    meetupsEntry.setMaxAttendees(maxAttendees);
    meetupsEntry.setPrice(price);

    if ((thumbnail != null) && (thumbnail.length > 0) &&
      (meetupsEntry.getThumbnailId() == 0)) {

      meetupsEntry.setThumbnailId(counterLocalService.increment());
    }

    meetupsEntryPersistence.update(meetupsEntry, false);

    if ((thumbnail != null) && (thumbnail.length > 0)) {
      ImageLocalServiceUtil.updateImage(
        meetupsEntry.getThumbnailId(), thumbnail);
    }

    return meetupsEntry;
  }
View Full Code Here

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    MeetupsEntry meetupsEntry = null;

    try {
      meetupsEntry = (MeetupsEntry)obj;
    }
    catch (ClassCastException cce) {
      return false;
    }

    long pk = meetupsEntry.getPrimaryKey();

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

   *
   * @param meetupsEntryId the primary key for the new meetups entry
   * @return the new meetups entry
   */
  public MeetupsEntry create(long meetupsEntryId) {
    MeetupsEntry meetupsEntry = new MeetupsEntryImpl();

    meetupsEntry.setNew(true);
    meetupsEntry.setPrimaryKey(meetupsEntryId);

    return meetupsEntry;
  }
View Full Code Here

    Session session = null;

    try {
      session = openSession();

      MeetupsEntry meetupsEntry = (MeetupsEntry)session.get(MeetupsEntryImpl.class,
          new Long(meetupsEntryId));

      if (meetupsEntry == null) {
        if (_log.isWarnEnabled()) {
          _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
View Full Code Here

   * @throws com.liferay.socialnetworking.NoSuchMeetupsEntryException if a meetups entry with the primary key could not be found
   * @throws SystemException if a system exception occurred
   */
  public MeetupsEntry findByPrimaryKey(long meetupsEntryId)
    throws NoSuchMeetupsEntryException, SystemException {
    MeetupsEntry meetupsEntry = fetchByPrimaryKey(meetupsEntryId);

    if (meetupsEntry == null) {
      if (_log.isWarnEnabled()) {
        _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + meetupsEntryId);
      }
View Full Code Here

   * @return the meetups entry, or <code>null</code> if a meetups entry with the primary key could not be found
   * @throws SystemException if a system exception occurred
   */
  public MeetupsEntry fetchByPrimaryKey(long meetupsEntryId)
    throws SystemException {
    MeetupsEntry meetupsEntry = (MeetupsEntry)EntityCacheUtil.getResult(MeetupsEntryModelImpl.ENTITY_CACHE_ENABLED,
        MeetupsEntryImpl.class, meetupsEntryId, this);

    if (meetupsEntry == null) {
      Session session = null;

View Full Code Here

   * @throws SystemException if a system exception occurred
   */
  public MeetupsEntry[] findByCompanyId_PrevAndNext(long meetupsEntryId,
    long companyId, OrderByComparator orderByComparator)
    throws NoSuchMeetupsEntryException, SystemException {
    MeetupsEntry meetupsEntry = findByPrimaryKey(meetupsEntryId);

    Session session = null;

    try {
      session = openSession();
View Full Code Here

   * @throws SystemException if a system exception occurred
   */
  public MeetupsEntry[] findByUserId_PrevAndNext(long meetupsEntryId,
    long userId, OrderByComparator orderByComparator)
    throws NoSuchMeetupsEntryException, SystemException {
    MeetupsEntry meetupsEntry = findByPrimaryKey(meetupsEntryId);

    Session session = null;

    try {
      session = openSession();
View Full Code Here

TOP

Related Classes of com.liferay.socialnetworking.model.MeetupsEntry

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.