Package com.liferay.portal.kernel.dao.orm

Examples of com.liferay.portal.kernel.dao.orm.Query


      query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
    }

    String sql = query.toString();

    Query q = session.createQuery(sql);

    q.setFirstResult(0);
    q.setMaxResults(2);

    QueryPos qPos = QueryPos.getInstance(q);

    qPos.add(meetupsEntryId);

    if (orderByComparator != null) {
      Object[] values = orderByComparator.getOrderByValues(meetupsRegistration);

      for (Object value : values) {
        qPos.add(value);
      }
    }

    List<MeetupsRegistration> list = q.list();

    if (list.size() == 2) {
      return list.get(1);
    }
    else {
View Full Code Here


        query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);

        qPos.add(meetupsEntryId);

        List<MeetupsRegistration> list = q.list();

        result = list;

        MeetupsRegistration meetupsRegistration = null;
View Full Code Here

          query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);
View Full Code Here

      query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
    }

    String sql = query.toString();

    Query q = session.createQuery(sql);

    q.setFirstResult(0);
    q.setMaxResults(2);

    QueryPos qPos = QueryPos.getInstance(q);

    qPos.add(meetupsEntryId);

    qPos.add(status);

    if (orderByComparator != null) {
      Object[] values = orderByComparator.getOrderByValues(meetupsRegistration);

      for (Object value : values) {
        qPos.add(value);
      }
    }

    List<MeetupsRegistration> list = q.list();

    if (list.size() == 2) {
      return list.get(1);
    }
    else {
View Full Code Here

        }
        else {
          sql = _SQL_SELECT_MEETUPSREGISTRATION.concat(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
        }

        Query q = session.createQuery(sql);

        if (orderByComparator == null) {
          list = (List<MeetupsRegistration>)QueryUtil.list(q,
              getDialect(), start, end, false);
View Full Code Here

        query.append(_FINDER_COLUMN_MEETUPSENTRYID_MEETUPSENTRYID_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
      }
      finally {
View Full Code Here

        query.append(_FINDER_COLUMN_U_ME_MEETUPSENTRYID_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);

        qPos.add(meetupsEntryId);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
      }
      finally {
View Full Code Here

        query.append(_FINDER_COLUMN_ME_S_STATUS_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);

        qPos.add(status);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
      }
      finally {
View Full Code Here

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(_SQL_COUNT_MEETUPSREGISTRATION);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
      }
      finally {
View Full Code Here

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(sql);

        if (orderByComparator == null) {
          list = (List<SLibrary>)QueryUtil.list(q, getDialect(),
              start, end, false);
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.dao.orm.Query

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.