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

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


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

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

      if (sr.first()) {
        while (true) {
          UserTrackerPathHBM userTrackerPathHBM = (UserTrackerPathHBM)sr.get(0);

          if (userTrackerPathHBM == null) {
            break;
          }

          com.liferay.portal.model.UserTrackerPath curUserTrackerPath = UserTrackerPathHBMUtil.model(userTrackerPathHBM);
          int value = obc.compare(userTrackerPath, curUserTrackerPath);

          if (value == 0) {
            if (!userTrackerPath.equals(curUserTrackerPath)) {
              break;
            }

            array[1] = curUserTrackerPath;

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

            sr.next();

            if (sr.next()) {
              array[2] = UserTrackerPathHBMUtil.model((UserTrackerPathHBM)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


          PortletHBM portletHBM = (PortletHBM)itr.next();
          list.add(PortletHBMUtil.model(portletHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PortletHBM portletHBM = (PortletHBM)sr.get(0);
            list.add(PortletHBMUtil.model(portletHBM));

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

          PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)itr.next();
          list.add(PollsVoteHBMUtil.model(pollsVoteHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)sr.get(0);
            list.add(PollsVoteHBMUtil.model(pollsVoteHBM));

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

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

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

      if (sr.first()) {
        while (true) {
          PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)sr.get(0);

          if (pollsVoteHBM == null) {
            break;
          }

          com.liferay.portlet.polls.model.PollsVote curPollsVote = PollsVoteHBMUtil.model(pollsVoteHBM);
          int value = obc.compare(pollsVote, curPollsVote);

          if (value == 0) {
            if (!pollsVote.equals(curPollsVote)) {
              break;
            }

            array[1] = curPollsVote;

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

            sr.next();

            if (sr.next()) {
              array[2] = PollsVoteHBMUtil.model((PollsVoteHBM)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

          PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)itr.next();
          list.add(PollsVoteHBMUtil.model(pollsVoteHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)sr.get(0);
            list.add(PollsVoteHBMUtil.model(pollsVoteHBM));

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

      int queryPos = 0;
      q.setString(queryPos++, questionId);
      q.setString(queryPos++, choiceId);

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

      if (sr.first()) {
        while (true) {
          PollsVoteHBM pollsVoteHBM = (PollsVoteHBM)sr.get(0);

          if (pollsVoteHBM == null) {
            break;
          }

          com.liferay.portlet.polls.model.PollsVote curPollsVote = PollsVoteHBMUtil.model(pollsVoteHBM);
          int value = obc.compare(pollsVote, curPollsVote);

          if (value == 0) {
            if (!pollsVote.equals(curPollsVote)) {
              break;
            }

            array[1] = curPollsVote;

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

            sr.next();

            if (sr.next()) {
              array[2] = PollsVoteHBMUtil.model((PollsVoteHBM)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

          AdminConfigHBM adminConfigHBM = (AdminConfigHBM)itr.next();
          list.add(AdminConfigHBMUtil.model(adminConfigHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            AdminConfigHBM adminConfigHBM = (AdminConfigHBM)sr.get(0);
            list.add(AdminConfigHBMUtil.model(adminConfigHBM));

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

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

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

      if (sr.first()) {
        while (true) {
          AdminConfigHBM adminConfigHBM = (AdminConfigHBM)sr.get(0);

          if (adminConfigHBM == null) {
            break;
          }

          com.liferay.portlet.admin.model.AdminConfig curAdminConfig = AdminConfigHBMUtil.model(adminConfigHBM);
          int value = obc.compare(adminConfig, curAdminConfig);

          if (value == 0) {
            if (!adminConfig.equals(curAdminConfig)) {
              break;
            }

            array[1] = curAdminConfig;

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

            sr.next();

            if (sr.next()) {
              array[2] = AdminConfigHBMUtil.model((AdminConfigHBM)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

          AdminConfigHBM adminConfigHBM = (AdminConfigHBM)itr.next();
          list.add(AdminConfigHBMUtil.model(adminConfigHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            AdminConfigHBM adminConfigHBM = (AdminConfigHBM)sr.get(0);
            list.add(AdminConfigHBMUtil.model(adminConfigHBM));

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

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

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

      if (sr.first()) {
        while (true) {
          AdminConfigHBM adminConfigHBM = (AdminConfigHBM)sr.get(0);

          if (adminConfigHBM == null) {
            break;
          }

          com.liferay.portlet.admin.model.AdminConfig curAdminConfig = AdminConfigHBMUtil.model(adminConfigHBM);
          int value = obc.compare(adminConfig, curAdminConfig);

          if (value == 0) {
            if (!adminConfig.equals(curAdminConfig)) {
              break;
            }

            array[1] = curAdminConfig;

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

            sr.next();

            if (sr.next()) {
              array[2] = AdminConfigHBMUtil.model((AdminConfigHBM)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.