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

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


          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));

            if (!sr.next()) {
              break;
            }
          }
        }
      }
View Full Code Here


      int queryPos = 0;
      q.setString(queryPos++, companyId);
      q.setString(queryPos++, className);

      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);

          if (addressHBM == null) {
            break;
          }

          com.liferay.portal.model.Address curAddress = AddressHBMUtil.model(addressHBM);
          int value = obc.compare(address, curAddress);

          if (value == 0) {
            if (!address.equals(curAddress)) {
              break;
            }

            array[1] = curAddress;

            if (sr.previous()) {
              array[0] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            sr.next();

            if (sr.next()) {
              array[2] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            break;
          }

          if (count == 1) {
            break;
          }

          count = (int)Math.ceil(count / 2.0);

          if (value < 0) {
            if (!sr.scroll(count * -1)) {
              break;
            }
          }
          else {
            if (!sr.scroll(count)) {
              break;
            }
          }
        }
      }
View Full Code Here

          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));

            if (!sr.next()) {
              break;
            }
          }
        }
      }
View Full Code Here

      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);

          if (addressHBM == null) {
            break;
          }

          com.liferay.portal.model.Address curAddress = AddressHBMUtil.model(addressHBM);
          int value = obc.compare(address, curAddress);

          if (value == 0) {
            if (!address.equals(curAddress)) {
              break;
            }

            array[1] = curAddress;

            if (sr.previous()) {
              array[0] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            sr.next();

            if (sr.next()) {
              array[2] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            break;
          }

          if (count == 1) {
            break;
          }

          count = (int)Math.ceil(count / 2.0);

          if (value < 0) {
            if (!sr.scroll(count * -1)) {
              break;
            }
          }
          else {
            if (!sr.scroll(count)) {
              break;
            }
          }
        }
      }
View Full Code Here

          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));

            if (!sr.next()) {
              break;
            }
          }
        }
      }
View Full Code Here

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

      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);

          if (addressHBM == null) {
            break;
          }

          com.liferay.portal.model.Address curAddress = AddressHBMUtil.model(addressHBM);
          int value = obc.compare(address, curAddress);

          if (value == 0) {
            if (!address.equals(curAddress)) {
              break;
            }

            array[1] = curAddress;

            if (sr.previous()) {
              array[0] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            sr.next();

            if (sr.next()) {
              array[2] = AddressHBMUtil.model((AddressHBM)sr.get(
                    0));
            }

            break;
          }

          if (count == 1) {
            break;
          }

          count = (int)Math.ceil(count / 2.0);

          if (value < 0) {
            if (!sr.scroll(count * -1)) {
              break;
            }
          }
          else {
            if (!sr.scroll(count)) {
              break;
            }
          }
        }
      }
View Full Code Here

          PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)itr.next();
          list.add(PollsQuestionHBMUtil.model(pollsQuestionHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)sr.get(0);
            list.add(PollsQuestionHBMUtil.model(pollsQuestionHBM));

            if (!sr.next()) {
              break;
            }
          }
        }
      }
View Full Code Here

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

      com.liferay.portlet.polls.model.PollsQuestion[] array = new com.liferay.portlet.polls.model.PollsQuestion[3];
      ScrollableResults sr = q.scroll();

      if (sr.first()) {
        while (true) {
          PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)sr.get(0);

          if (pollsQuestionHBM == null) {
            break;
          }

          com.liferay.portlet.polls.model.PollsQuestion curPollsQuestion =
            PollsQuestionHBMUtil.model(pollsQuestionHBM);
          int value = obc.compare(pollsQuestion, curPollsQuestion);

          if (value == 0) {
            if (!pollsQuestion.equals(curPollsQuestion)) {
              break;
            }

            array[1] = curPollsQuestion;

            if (sr.previous()) {
              array[0] = PollsQuestionHBMUtil.model((PollsQuestionHBM)sr.get(
                    0));
            }

            sr.next();

            if (sr.next()) {
              array[2] = PollsQuestionHBMUtil.model((PollsQuestionHBM)sr.get(
                    0));
            }

            break;
          }

          if (count == 1) {
            break;
          }

          count = (int)Math.ceil(count / 2.0);

          if (value < 0) {
            if (!sr.scroll(count * -1)) {
              break;
            }
          }
          else {
            if (!sr.scroll(count)) {
              break;
            }
          }
        }
      }
View Full Code Here

          PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)itr.next();
          list.add(PollsQuestionHBMUtil.model(pollsQuestionHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)sr.get(0);
            list.add(PollsQuestionHBMUtil.model(pollsQuestionHBM));

            if (!sr.next()) {
              break;
            }
          }
        }
      }
View Full Code Here

      int queryPos = 0;
      q.setString(queryPos++, portletId);
      q.setString(queryPos++, companyId);

      com.liferay.portlet.polls.model.PollsQuestion[] array = new com.liferay.portlet.polls.model.PollsQuestion[3];
      ScrollableResults sr = q.scroll();

      if (sr.first()) {
        while (true) {
          PollsQuestionHBM pollsQuestionHBM = (PollsQuestionHBM)sr.get(0);

          if (pollsQuestionHBM == null) {
            break;
          }

          com.liferay.portlet.polls.model.PollsQuestion curPollsQuestion =
            PollsQuestionHBMUtil.model(pollsQuestionHBM);
          int value = obc.compare(pollsQuestion, curPollsQuestion);

          if (value == 0) {
            if (!pollsQuestion.equals(curPollsQuestion)) {
              break;
            }

            array[1] = curPollsQuestion;

            if (sr.previous()) {
              array[0] = PollsQuestionHBMUtil.model((PollsQuestionHBM)sr.get(
                    0));
            }

            sr.next();

            if (sr.next()) {
              array[2] = PollsQuestionHBMUtil.model((PollsQuestionHBM)sr.get(
                    0));
            }

            break;
          }

          if (count == 1) {
            break;
          }

          count = (int)Math.ceil(count / 2.0);

          if (value < 0) {
            if (!sr.scroll(count * -1)) {
              break;
            }
          }
          else {
            if (!sr.scroll(count)) {
              break;
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.net.sf.hibernate.ScrollableResults

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.