Examples of CriteriaImpl


Examples of org.hibernate.internal.CriteriaImpl

  public void setCriteria(Criteria criteria) {
    if ( criteria != null ) {
      isExplicitCriteria = true;
      sizeSafe = true;
      if ( criteria instanceof CriteriaImpl ) {
        CriteriaImpl impl = (CriteriaImpl) criteria;
        //restriction of sub criteria => suspect
        //TODO some sub criteria might be ok (outer joins)
        sizeSafe = !impl.iterateExpressionEntries().hasNext() && !impl.iterateSubcriteria().hasNext();
      }
    }
    else {
      sizeSafe = true;
      isExplicitCriteria = false;
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

  public void setCriteria(Criteria criteria) {
    if (criteria != null) {
      isExplicitCriteria = true;
      sizeSafe = true;
      if ( criteria instanceof CriteriaImpl ) {
        CriteriaImpl impl = (CriteriaImpl) criteria;
        //restriction of subcriteria => suspect
        //TODO some subcriteria might be ok (outer joins)
        sizeSafe = !impl.iterateExpressionEntries().hasNext() && !impl.iterateSubcriteria().hasNext();
      }
    }
    else {
      sizeSafe = true;
      isExplicitCriteria = false;
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

   */
  public static Criteria applyInlineCount(Criteria crit)
  {
      crit.setMaxResults(0);
      crit.setFirstResult(0);
      CriteriaImpl impl = (CriteriaImpl) crit;
      Iterator<OrderEntry> iter = impl.iterateOrderings();
      while (iter.hasNext()) {
        iter.next();
        iter.remove();
      }
    crit.setProjection( Projections.rowCount());
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

        if (pageRequest != null) {
            // see https://forum.hibernate.org/viewtopic.php?t=974802

            // Save original Projection and ResultTransformer
            CriteriaImpl cImpl = (CriteriaImpl) c;
            Projection origProjection = cImpl.getProjection();
            ResultTransformer origRt = cImpl.getResultTransformer();

            // Get total number of records by setting a rowCount projection
            page.setMaxRecords(findRowCount(c));

            // Restore original Projection and ResultTransformer
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

  public void setCriteria(Criteria criteria) {
    if ( criteria != null ) {
      isExplicitCriteria = true;
      sizeSafe = true;
      if ( criteria instanceof CriteriaImpl ) {
        CriteriaImpl impl = (CriteriaImpl) criteria;
        //restriction of subcriteria => suspect
        //TODO some subcriteria might be ok (outer joins)
        sizeSafe = !impl.iterateExpressionEntries().hasNext() && !impl.iterateSubcriteria().hasNext();
      }
    }
    else {
      sizeSafe = true;
      isExplicitCriteria = false;
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

  public void setCriteria(Criteria criteria) {
    if ( criteria != null ) {
      isExplicitCriteria = true;
      sizeSafe = true;
      if ( criteria instanceof CriteriaImpl ) {
        CriteriaImpl impl = (CriteriaImpl) criteria;
        //restriction of subcriteria => suspect
        //TODO some subcriteria might be ok (outer joins)
        sizeSafe = !impl.iterateExpressionEntries().hasNext() && !impl.iterateSubcriteria().hasNext();
      }
    }
    else {
      sizeSafe = true;
      isExplicitCriteria = false;
View Full Code Here

Examples of org.hibernate.internal.CriteriaImpl

  public void setCriteria(Criteria criteria) {
    if (criteria != null) {
      isExplicitCriteria = true;
      sizeSafe = true;
      if ( criteria instanceof CriteriaImpl ) {
        CriteriaImpl impl = (CriteriaImpl) criteria;
        //restriction of subcriteria => suspect
        //TODO some subcriteria might be ok (outer joins)
        sizeSafe = !impl.iterateExpressionEntries().hasNext() && !impl.iterateSubcriteria().hasNext();
      }
    }
    else {
      sizeSafe = true;
      isExplicitCriteria = false;
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.