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

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


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

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

      Iterator itr = q.list().iterator();
      List list = new ArrayList();

      while (itr.hasNext()) {
        AdminConfigHBM adminConfigHBM = (AdminConfigHBM)itr.next();
        list.add(AdminConfigHBMUtil.model(adminConfigHBM));
View Full Code Here


      if (obc != null) {
        query.append("ORDER BY " + obc.getOrderBy());
      }

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

      List list = new ArrayList();

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

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

        while (itr.hasNext()) {
          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));
View Full Code Here

      if (obc != null) {
        query.append("ORDER BY " + obc.getOrderBy());
      }

      Query q = session.createQuery(query.toString());
      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);
View Full Code Here

      query.append(
        "FROM AdminConfig IN CLASS com.liferay.portlet.admin.ejb.AdminConfigHBM WHERE ");
      query.append("companyId = ?");
      query.append(" ");

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

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

      while (itr.hasNext()) {
        AdminConfigHBM adminConfigHBM = (AdminConfigHBM)itr.next();
        AdminConfigPool.remove((String)adminConfigHBM.getPrimaryKey());
        session.delete(adminConfigHBM);
View Full Code Here

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

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

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

      while (itr.hasNext()) {
        AdminConfigHBM adminConfigHBM = (AdminConfigHBM)itr.next();
        AdminConfigPool.remove((String)adminConfigHBM.getPrimaryKey());
        session.delete(adminConfigHBM);
View Full Code Here

      query.append(
        "FROM AdminConfig IN CLASS com.liferay.portlet.admin.ejb.AdminConfigHBM 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("companyId = ?");
      query.append(" AND ");
      query.append("type_ = ?");
      query.append(" ");

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

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

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

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

      query.append(
        "FROM PollsDisplay IN CLASS com.liferay.portlet.polls.ejb.PollsDisplayHBM WHERE ");
      query.append("userId = ?");
      query.append(" ");

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

      Iterator itr = q.list().iterator();
      List list = new ArrayList();

      while (itr.hasNext()) {
        PollsDisplayHBM pollsDisplayHBM = (PollsDisplayHBM)itr.next();
        list.add(PollsDisplayHBMUtil.model(pollsDisplayHBM));
View Full Code Here

      if (obc != null) {
        query.append("ORDER BY " + obc.getOrderBy());
      }

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

      List list = new ArrayList();

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

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

        while (itr.hasNext()) {
          PollsDisplayHBM pollsDisplayHBM = (PollsDisplayHBM)itr.next();
          list.add(PollsDisplayHBMUtil.model(pollsDisplayHBM));
        }
      }
      else {
        ScrollableResults sr = q.scroll();

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

      if (obc != null) {
        query.append("ORDER BY " + obc.getOrderBy());
      }

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

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

      if (sr.first()) {
        while (true) {
          PollsDisplayHBM pollsDisplayHBM = (PollsDisplayHBM)sr.get(0);
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.