Package org.hibernate

Examples of org.hibernate.SQLQuery.list()


    SQLQuery query = ssn.createSQLQuery(sql.toString());
    if(site>0)
      query.setInteger(0, site);
    query.setMaxResults(count);
    List tags = new ArrayList();
    List results = query.list();
    for(int i=0;results!=null && i<results.size();i++){
      tags.add(((Object[])results.get(i))[0]);
    }
    return tags;
  }
View Full Code Here


                }
                public List transformList(List list) { return list; }
            }
        );

        List<BlogEntry> result = (List<BlogEntry>)query.list();

        if (countComments && result.size() > 0) {
            // The risk here is that pager.getQueryMaxResults() is too large for the IN() operator of some DBs...
            StringBuilder commentQueryString = new StringBuilder();
            commentQueryString.append("select doc.NODE_ID as DOC_ID, count(c1.NODE_ID) as COMMENT_COUNT").append(" ");
View Full Code Here

                      return null;
                  }
                  public List transformList(List list) { return list; }
              }
            );
            commentQuery.list();
        }

        return result;
    }
View Full Code Here

                }
                public List transformList(List list) { return list; }
            }
        );

        return (List<BlogEntryCount>) query.list();
    }

    private Session getSession() {
        return ((Session)((org.jboss.seam.persistence.EntityManagerProxy) restrictedEntityManager).getDelegate());
    }
View Full Code Here

    //needs to be there otherwise an exception is thrown
    query.addScalar("storage", StandardBasicTypes.DOUBLE);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
        this.getClass()).getTitle() + " "
        + Helper.getTranslation("_inGB"));
View Full Code Here

    query.addScalar("stepCount", StandardBasicTypes.DOUBLE);
    query.addScalar("stepName", StandardBasicTypes.STRING);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable("");

    // if headerRow is set then add it to the DataTable to set columns
    // needs to be removed later
View Full Code Here

    //needs to be there otherwise an exception is thrown
    query.addScalar("stepCount", StandardBasicTypes.DOUBLE);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
        this.getClass()).getTitle()
        + Helper.getTranslation("_(number)"));
View Full Code Here

      headerQuery.addScalar("stepName", StandardBasicTypes.STRING);
      headerQuery.addScalar("stepOrder", StandardBasicTypes.DOUBLE);
      headerQuery.addScalar("intervall", StandardBasicTypes.STRING);

      @SuppressWarnings("rawtypes")
      List headerList = headerQuery.list();
      for (Object obj : headerList) {
        Object[] objArr = (Object[]) obj;
        try {
          headerRow.setName(new Converter(objArr[3]).getString() + "");
          headerRow.addValue(new Converter(new Converter(objArr[2]).getInteger()).getString() + " (" + new Converter(objArr[1]).getString()
View Full Code Here

    query.addScalar("stepName", StandardBasicTypes.STRING);
    query.addScalar("stepOrder", StandardBasicTypes.DOUBLE);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable("");

    // if headerRow is set then add it to the DataTable to set columns
    // needs to be removed later
View Full Code Here

    // needs to be there otherwise an exception is thrown
    query.addScalar("maxStep", StandardBasicTypes.DOUBLE);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    if (list != null && list.size() > 0 && list.get(0) != null) {
      return new Converter(list.get(0)).getInteger();
    } else {
      return 0;
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.