Examples of Guestbook


Examples of com.liferay.docs.guestbook.model.Guestbook

   
    validate(name);
   
    long guestbookId = counterLocalService.increment();
   
    Guestbook guestbook = guestbookPersistence.create(guestbookId);
   
    guestbook.setUuid(serviceContext.getUuid());
    guestbook.setGroupId(groupId);
    guestbook.setCompanyId(user.getCompanyId());
    guestbook.setUserName(user.getFullName());
    guestbook.setCreateDate(serviceContext.getCreateDate(now));
    guestbook.setModifiedDate(serviceContext.getModifiedDate(now));
    guestbook.setName(name);
    guestbook.setExpandoBridgeAttributes(serviceContext);
   
    guestbookPersistence.update(guestbook);
   
    return guestbook;
   
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

  }

  @Override
  protected void doDelete(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;
   
    deleteDocument(guestbook.getCompanyId(), guestbook.getGuestbookId());
  }
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

  }

  @Override
  protected Document doGetDocument(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;

    Document document = getBaseModelDocument(PORTLET_ID, guestbook);

    document.addDate(Field.MODIFIED_DATE, guestbook.getModifiedDate());
    document.addText(Field.TITLE, guestbook.getName());
    document.addKeyword(Field.GROUP_ID, getSiteGroupId(guestbook.getGroupId()));
    document.addKeyword(Field.SCOPE_GROUP_ID, guestbook.getGroupId());
   
    return document;
  }
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

  }

  @Override
  protected void doReindex(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;

    Document document = getDocument(guestbook);

    SearchEngineUtil.updateDocument(
      getSearchEngineId(), guestbook.getCompanyId(), document);
  }
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

   */
  @Override
  public Guestbook findByUuid_First(String uuid,
    OrderByComparator orderByComparator)
    throws NoSuchGuestbookException, SystemException {
    Guestbook guestbook = fetchByUuid_First(uuid, orderByComparator);

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

View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

  }

  @Override
  protected void doReindex(String className, long classPK) throws Exception {

    Guestbook guestbook = GuestbookLocalServiceUtil.getGuestbook(classPK);

    doReindex(guestbook);
  }
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

      protected void addCriteria(DynamicQuery dynamicQuery) {
      }

      @Override
      protected void performAction(Object object) throws PortalException {
        Guestbook guestbook = (Guestbook) object;

        Document document = getDocument(guestbook);

        documents.add(document);
      }
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

   */
  @Override
  public Guestbook findByUuid_Last(String uuid,
    OrderByComparator orderByComparator)
    throws NoSuchGuestbookException, SystemException {
    Guestbook guestbook = fetchByUuid_Last(uuid, orderByComparator);

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

View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

    return super.deleteGuestbook(guestbook);
  }

  public Guestbook getFirstGuestbookByName(long groupId, String name) throws SystemException {
    Guestbook guestbook = null;

    List<Guestbook> guestbooks = guestbookPersistence.findByName(groupId, name);

    if ((guestbooks != null) && (guestbooks.size() > 0)) {
      guestbook = guestbooks.get(0);
View Full Code Here

Examples of com.liferay.docs.guestbook.model.Guestbook

      List<Guestbook> guestbooks = GuestbookLocalServiceUtil
          .getGuestbooks(groupId);

      if (guestbooks.size() == 0) {
        Guestbook guestbook = GuestbookLocalServiceUtil.addGuestbook(
            serviceContext.getUserId(), "Main", serviceContext);

        guestbookId = guestbook.getGuestbookId();

      }

      if (!(guestbookId > 0)) {
        guestbookId = guestbooks.get(0).getGuestbookId();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.