Package org.hibernate

Examples of org.hibernate.Query.list()


        q.setInteger("cat_type", CatalogBean.TYPE_OWNER);
        if(user != null)
          q.setInteger("user", user.getId());
      }
      int total = 0;
      Iterator logs = q.list().iterator();
      while(logs.hasNext()){
        tempCal.setTime((Date)logs.next());
        int date = tempCal.get(Calendar.DATE);
        logCounts[date]++;
        total ++;
View Full Code Here


      }
      if(fromIdx>0)
        q.setFirstResult(fromIdx);
      if(count>0)
        q.setMaxResults(count);
      return q.list();
    } finally {
      hql = null;
    }
  }
View Full Code Here

      }
      if(fromIdx>0)
        q.setFirstResult(fromIdx);
      if(count>0)
        q.setMaxResults(count);
      return q.list();
    } finally {
      hql = null;
    }
  }
View Full Code Here

    }
    if(fromIdx>0)
      q.setFirstResult(fromIdx);
    if(count>0)
      q.setMaxResults(count);
    return q.list();
  }

  /**
   * ��ҳ�г�ijƪ�ռǵ�����
   * @param log_id
View Full Code Here

      beginTransaction();
      ssn.save(obj);
      // ���¶�ȡ�����б�����˳���������
      Query q = ssn.getNamedQuery("LIST_FORUMS");
      q.setInteger(0, obj.getSite().getId());
      List links = q.list();
      if (links.size() >= ConfigDAO.getMaxCatalogCount(obj.getSite()
          .getId()))
        throw new CapacityExceedException(links.size());
      if (links.size() > 1) {
        for (int i = 0; i < links.size(); i++) {
View Full Code Here

    }
    if(fromIdx > 0)
      q.setFirstResult(fromIdx);
    if(fetchCount > 0)
      q.setMaxResults(fetchCount);
    return q.list();
  }

  protected static List executeQuery(String hql, int fromIdx, int fetchCount, int parm1){
    return executeQuery(hql, fromIdx, fetchCount, new Object[]{new Integer(parm1)});
  }
View Full Code Here

    }
    if(fromIdx > 0)
      q.setFirstResult(fromIdx);
    if(fetchCount > 0)
      q.setMaxResults(fetchCount);
    return q.list();
  }

  protected static List executeNamedQuery(String hql, int fromIdx, int fetchCount, int parm1){
    return executeNamedQuery(hql, fromIdx, fetchCount, new Object[]{new Integer(parm1)});
  }
View Full Code Here

    catalogs.addAll(site.getCatalogs());
    List perms = null;
    if(user != null){
      Query q = getSession().getNamedQuery("USER_PERMS");
      q.setInteger(0, user.getId());
      perms = q.list();
    }
    Iterator iter = catalogs.iterator();
    while (iter.hasNext()) {
      CatalogBean catalog = (CatalogBean) iter.next();
      // ���ɷ����κ��˶����Է���
View Full Code Here

      q.setInteger("forum", fbean.getId());
    if(fromIdx > 0)
      q.setFirstResult(fromIdx);
    if(count > 0)
      q.setMaxResults(count);
    return q.list();
  }
 
  /**
   * ��ȡ��һƪ����
   * @param forum_id
View Full Code Here

      if(forum != null)
        q.setInteger(3, forum.getId());
      if(fromIdx > 0)
        q.setFirstResult(fromIdx);
      q.setMaxResults(count);
      return q.list();
    }finally{
      hql = null;
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.