Package org.hibernate

Examples of org.hibernate.Criteria.list()


      criteria.setFirstResult(startIndex);
      criteria.setMaxResults(rowAmount);

     
      result.addAll((List<Object[]>) criteria.list());
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here


      HibernateUtil.criterionSupport(criteria, criterions);
      for (Criterion criterion : criterions) {
        criteria.add(criterion);
      }
      result.addAll((List<Object[]>) criteria.list());
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

      for (Criterion criterion : criterions) {
        criteria.add(criterion);
      }
      criteria.setFirstResult(startIndex);
      criteria.setMaxResults(rowAmount);
      result.addAll((List<Object[]>) criteria.list());
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

      criteria.setProjection(HibernateUtil.projectionSupport(criteria,
          projections));

      criteria.setFirstResult(startIndex);
      criteria.setMaxResults(rowAmount);
      result.addAll((List<Object[]>) criteria.list());
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

    try {
      session = getSession();
      criteria = session.createCriteria(domainClass);
      criteria.setProjection(HibernateUtil.projectionSupport(criteria,
          projections));
      result.addAll((List<Object[]>) criteria.list());
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

      Criteria criteria = session.createCriteria(domainClass);
      HibernateUtil.criterionSupport(criteria, criterions);
      for (Criterion criterion : criterions) {
        criteria.add(criterion);
      }
      result = (List<T>) criteria.list();
    } catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

      criteria.setProjection(Projections.rowCount());
      HibernateUtil.criterionSupport(criteria, criterions);
      for (Criterion criterion : criterions) {
        criteria.add(criterion);
      }
      result = criteria.list().size();
    }catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

     
      HibernateUtil.criterionSupport(criteria, criterions);
      for (Criterion criterion : criterions) {
        criteria.add(criterion);
      }
      result = criteria.list().size();
    }catch (HibernateException e) {
      handleException(e);
    } finally {
      closeSession();
    }
View Full Code Here

        .add(Restrictions.eq("type", PromptType.TEACHER_NOTES))
      .add(Restrictions.eq("r.user", teacher.getObject()))
      .add(Restrictions.eq("r.valid", true))
      .setCacheable(true)
      .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
    return promptCriteria.list();
  }

 
  /* (non-Javadoc)
   * @see org.cast.isi.service.IISIResponseService#getPagesWithNotes(org.cast.cwm.data.User, boolean)
View Full Code Here

        .add(Restrictions.eq("collectionName", collectionName))
      .add(Restrictions.eq("r.user", mUser.getObject()))
      .add(Restrictions.eq("r.valid", true))
      .setCacheable(true)
      .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
    return promptCriteria.list();
  }

  /* (non-Javadoc)
   * @see org.cast.isi.service.IISIResponseService#getAllResponsesForPromptByStudent(org.apache.wicket.model.IModel<org.cast.cwm.data.Prompt>, org.apache.wicket.model.IModel<org.cast.cwm.data.User>)
   */
 
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.