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++, groupId);

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

      if (sr.first()) {
        while (true) {
          PortletHBM portletHBM = (PortletHBM)sr.get(0);

          if (portletHBM == null) {
            break;
          }

          com.liferay.portal.model.Portlet curPortlet = PortletHBMUtil.model(portletHBM);
          int value = obc.compare(portlet, curPortlet);

          if (value == 0) {
            if (!portlet.equals(curPortlet)) {
              break;
            }

            array[1] = curPortlet;

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

            sr.next();

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

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

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

      if (sr.first()) {
        while (true) {
          PortletHBM portletHBM = (PortletHBM)sr.get(0);

          if (portletHBM == null) {
            break;
          }

          com.liferay.portal.model.Portlet curPortlet = PortletHBMUtil.model(portletHBM);
          int value = obc.compare(portlet, curPortlet);

          if (value == 0) {
            if (!portlet.equals(curPortlet)) {
              break;
            }

            array[1] = curPortlet;

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

            sr.next();

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

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

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

      if (sr.first()) {
        while (true) {
          PortletHBM portletHBM = (PortletHBM)sr.get(0);

          if (portletHBM == null) {
            break;
          }

          com.liferay.portal.model.Portlet curPortlet = PortletHBMUtil.model(portletHBM);
          int value = obc.compare(portlet, curPortlet);

          if (value == 0) {
            if (!portlet.equals(curPortlet)) {
              break;
            }

            array[1] = curPortlet;

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

            sr.next();

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

          UserTrackerHBM userTrackerHBM = (UserTrackerHBM)itr.next();
          list.add(UserTrackerHBMUtil.model(userTrackerHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            UserTrackerHBM userTrackerHBM = (UserTrackerHBM)sr.get(0);
            list.add(UserTrackerHBMUtil.model(userTrackerHBM));

            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.UserTracker[] array = new com.liferay.portal.model.UserTracker[3];
      ScrollableResults sr = q.scroll();

      if (sr.first()) {
        while (true) {
          UserTrackerHBM userTrackerHBM = (UserTrackerHBM)sr.get(0);

          if (userTrackerHBM == null) {
            break;
          }

          com.liferay.portal.model.UserTracker curUserTracker = UserTrackerHBMUtil.model(userTrackerHBM);
          int value = obc.compare(userTracker, curUserTracker);

          if (value == 0) {
            if (!userTracker.equals(curUserTracker)) {
              break;
            }

            array[1] = curUserTracker;

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

            sr.next();

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

          UserTrackerHBM userTrackerHBM = (UserTrackerHBM)itr.next();
          list.add(UserTrackerHBMUtil.model(userTrackerHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            UserTrackerHBM userTrackerHBM = (UserTrackerHBM)sr.get(0);
            list.add(UserTrackerHBMUtil.model(userTrackerHBM));

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

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

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

      if (sr.first()) {
        while (true) {
          UserTrackerHBM userTrackerHBM = (UserTrackerHBM)sr.get(0);

          if (userTrackerHBM == null) {
            break;
          }

          com.liferay.portal.model.UserTracker curUserTracker = UserTrackerHBMUtil.model(userTrackerHBM);
          int value = obc.compare(userTracker, curUserTracker);

          if (value == 0) {
            if (!userTracker.equals(curUserTracker)) {
              break;
            }

            array[1] = curUserTracker;

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

            sr.next();

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

          UserTrackerPathHBM userTrackerPathHBM = (UserTrackerPathHBM)itr.next();
          list.add(UserTrackerPathHBMUtil.model(userTrackerPathHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            UserTrackerPathHBM userTrackerPathHBM = (UserTrackerPathHBM)sr.get(0);
            list.add(UserTrackerPathHBMUtil.model(
                userTrackerPathHBM));

            if (!sr.next()) {
              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.