Package com.dotcms.repackage.net.sf.hibernate

Examples of com.dotcms.repackage.net.sf.hibernate.Query


        query.append("className ASC").append(", ");
        query.append("classPK ASC").append(", ");
        query.append("priority ASC");
      }

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);
      q.setString(queryPos++, classPK);

      List list = new ArrayList();

      if (getDialect().supportsLimit()) {
        q.setMaxResults(end - begin);
        q.setFirstResult(begin);

        Iterator itr = q.list().iterator();

        while (itr.hasNext()) {
          AddressHBM addressHBM = (AddressHBM)itr.next();
          list.add(AddressHBMUtil.model(addressHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            AddressHBM addressHBM = (AddressHBM)sr.get(0);
            list.add(AddressHBMUtil.model(addressHBM));
View Full Code Here


        query.append("className ASC").append(", ");
        query.append("classPK ASC").append(", ");
        query.append("priority ASC");
      }

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);
      q.setString(queryPos++, classPK);

      com.liferay.portal.model.Address[] array = new com.liferay.portal.model.Address[3];
      ScrollableResults sr = q.scroll();

      if (sr.first()) {
        while (true) {
          AddressHBM addressHBM = (AddressHBM)sr.get(0);
View Full Code Here

      query.append("companyId ASC").append(", ");
      query.append("className ASC").append(", ");
      query.append("classPK ASC").append(", ");
      query.append("priority ASC");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);

      Iterator itr = q.list().iterator();

      while (itr.hasNext()) {
        AddressHBM addressHBM = (AddressHBM)itr.next();
        AddressPool.remove((String)addressHBM.getPrimaryKey());
        session.delete(addressHBM);
View Full Code Here

      query.append("companyId ASC").append(", ");
      query.append("className ASC").append(", ");
      query.append("classPK ASC").append(", ");
      query.append("priority ASC");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, userId);

      Iterator itr = q.list().iterator();

      while (itr.hasNext()) {
        AddressHBM addressHBM = (AddressHBM)itr.next();
        AddressPool.remove((String)addressHBM.getPrimaryKey());
        session.delete(addressHBM);
View Full Code Here

      query.append("companyId ASC").append(", ");
      query.append("className ASC").append(", ");
      query.append("classPK ASC").append(", ");
      query.append("priority ASC");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);

      Iterator itr = q.list().iterator();

      while (itr.hasNext()) {
        AddressHBM addressHBM = (AddressHBM)itr.next();
        AddressPool.remove((String)addressHBM.getPrimaryKey());
        session.delete(addressHBM);
View Full Code Here

      query.append("companyId ASC").append(", ");
      query.append("className ASC").append(", ");
      query.append("classPK ASC").append(", ");
      query.append("priority ASC");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);
      q.setString(queryPos++, classPK);

      Iterator itr = q.list().iterator();

      while (itr.hasNext()) {
        AddressHBM addressHBM = (AddressHBM)itr.next();
        AddressPool.remove((String)addressHBM.getPrimaryKey());
        session.delete(addressHBM);
View Full Code Here

      query.append(
        "FROM Address IN CLASS com.liferay.portal.ejb.AddressHBM WHERE ");
      query.append("companyId = ?");
      query.append(" ");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);

      Iterator itr = q.list().iterator();

      if (itr.hasNext()) {
        Integer count = (Integer)itr.next();

        if (count != null) {
View Full Code Here

      query.append(
        "FROM Address IN CLASS com.liferay.portal.ejb.AddressHBM WHERE ");
      query.append("userId = ?");
      query.append(" ");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, userId);

      Iterator itr = q.list().iterator();

      if (itr.hasNext()) {
        Integer count = (Integer)itr.next();

        if (count != null) {
View Full Code Here

      query.append("companyId = ?");
      query.append(" AND ");
      query.append("className = ?");
      query.append(" ");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);

      Iterator itr = q.list().iterator();

      if (itr.hasNext()) {
        Integer count = (Integer)itr.next();

        if (count != null) {
View Full Code Here

      query.append("className = ?");
      query.append(" AND ");
      query.append("classPK = ?");
      query.append(" ");

      Query q = session.createQuery(query.toString());
      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);
      q.setString(queryPos++, classPK);

      Iterator itr = q.list().iterator();

      if (itr.hasNext()) {
        Integer count = (Integer)itr.next();

        if (count != null) {
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.net.sf.hibernate.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.