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

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


          list.add(PortletPreferencesHBMUtil.model(
              portletPreferencesHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);
            list.add(PortletPreferencesHBMUtil.model(
                portletPreferencesHBM));

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


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

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

      if (sr.first()) {
        while (true) {
          PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);

          if (portletPreferencesHBM == null) {
            break;
          }

          com.liferay.portal.model.PortletPreferences curPortletPreferences =
            PortletPreferencesHBMUtil.model(portletPreferencesHBM);
          int value = obc.compare(portletPreferences,
              curPortletPreferences);

          if (value == 0) {
            if (!portletPreferences.equals(curPortletPreferences)) {
              break;
            }

            array[1] = curPortletPreferences;

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

            sr.next();

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

          list.add(PortletPreferencesHBMUtil.model(
              portletPreferencesHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);
            list.add(PortletPreferencesHBMUtil.model(
                portletPreferencesHBM));

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

      if (sr.first()) {
        while (true) {
          PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);

          if (portletPreferencesHBM == null) {
            break;
          }

          com.liferay.portal.model.PortletPreferences curPortletPreferences =
            PortletPreferencesHBMUtil.model(portletPreferencesHBM);
          int value = obc.compare(portletPreferences,
              curPortletPreferences);

          if (value == 0) {
            if (!portletPreferences.equals(curPortletPreferences)) {
              break;
            }

            array[1] = curPortletPreferences;

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

            sr.next();

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

          list.add(PortletPreferencesHBMUtil.model(
              portletPreferencesHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);
            list.add(PortletPreferencesHBMUtil.model(
                portletPreferencesHBM));

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

      int queryPos = 0;
      q.setString(queryPos++, layoutId);
      q.setString(queryPos++, userId);

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

      if (sr.first()) {
        while (true) {
          PortletPreferencesHBM portletPreferencesHBM = (PortletPreferencesHBM)sr.get(0);

          if (portletPreferencesHBM == null) {
            break;
          }

          com.liferay.portal.model.PortletPreferences curPortletPreferences =
            PortletPreferencesHBMUtil.model(portletPreferencesHBM);
          int value = obc.compare(portletPreferences,
              curPortletPreferences);

          if (value == 0) {
            if (!portletPreferences.equals(curPortletPreferences)) {
              break;
            }

            array[1] = curPortletPreferences;

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

            sr.next();

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

          PasswordTrackerHBM passwordTrackerHBM = (PasswordTrackerHBM)itr.next();
          list.add(PasswordTrackerHBMUtil.model(passwordTrackerHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

        if (sr.first() && sr.scroll(begin)) {
          for (int i = begin; i < end; i++) {
            PasswordTrackerHBM passwordTrackerHBM = (PasswordTrackerHBM)sr.get(0);
            list.add(PasswordTrackerHBMUtil.model(
                passwordTrackerHBM));

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

      if (sr.first()) {
        while (true) {
          PasswordTrackerHBM passwordTrackerHBM = (PasswordTrackerHBM)sr.get(0);

          if (passwordTrackerHBM == null) {
            break;
          }

          com.liferay.portal.model.PasswordTracker curPasswordTracker = PasswordTrackerHBMUtil.model(passwordTrackerHBM);
          int value = obc.compare(passwordTracker, curPasswordTracker);

          if (value == 0) {
            if (!passwordTracker.equals(curPasswordTracker)) {
              break;
            }

            array[1] = curPasswordTracker;

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

            sr.next();

            if (sr.next()) {
              array[2] = PasswordTrackerHBMUtil.model((PasswordTrackerHBM)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++, userId);

      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

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.