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

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


        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(groupId);

        qPos.add(userId);

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


      SQLQuery q = session.createSQLQuery(sql);

      q.addScalar(COUNT_COLUMN_NAME, Type.LONG);

      QueryPos qPos = QueryPos.getInstance(q);

      qPos.add(groupId1);
      qPos.add(groupId2);
      qPos.add(userId1);
      qPos.add(userId2);

      Iterator<Long> itr = q.list().iterator();

      if (itr.hasNext()) {
        Long count = itr.next();
View Full Code Here

      SQLQuery q = session.createSQLQuery(sql);

      q.addEntity("SN_WallEntry", WallEntryImpl.class);

      QueryPos qPos = QueryPos.getInstance(q);

      qPos.add(groupId1);
      qPos.add(groupId2);
      qPos.add(userId1);
      qPos.add(userId2);

      return (List<WallEntry>)QueryUtil.list(q, getDialect(), start, end);
    }
    catch (Exception e) {
      throw new SystemException(e);
View Full Code Here

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(groupId);

        list = (List<WallEntry>)QueryUtil.list(q, getDialect(), start,
            end);
      }
      catch (Exception e) {
View Full Code Here

    Query q = session.createQuery(sql);

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

    QueryPos qPos = QueryPos.getInstance(q);

    qPos.add(groupId);

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

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

    List<WallEntry> list = q.list();
View Full Code Here

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);

        list = (List<WallEntry>)QueryUtil.list(q, getDialect(), start,
            end);
      }
      catch (Exception e) {
View Full Code Here

    Query q = session.createQuery(sql);

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

    QueryPos qPos = QueryPos.getInstance(q);

    qPos.add(userId);

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

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

    List<WallEntry> list = q.list();
View Full Code Here

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(groupId);

        qPos.add(userId);

        list = (List<WallEntry>)QueryUtil.list(q, getDialect(), start,
            end);
      }
      catch (Exception e) {
View Full Code Here

    Query q = session.createQuery(sql);

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

    QueryPos qPos = QueryPos.getInstance(q);

    qPos.add(groupId);

    qPos.add(userId);

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

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

    List<WallEntry> list = q.list();
View Full Code Here

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(groupId);

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

TOP

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

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.