Package org.hibernate.impl.CriteriaImpl

Examples of org.hibernate.impl.CriteriaImpl.Subcriteria


    public AssociationPathRegister(Criteria rootCriteria) {
      if (CriteriaImpl.class.isAssignableFrom(rootCriteria.getClass())) {
          Iterator<Subcriteria> subCriteriaIterator = CriteriaImpl.class.cast(rootCriteria).iterateSubcriteria();
         
          while (subCriteriaIterator.hasNext()) {
                Subcriteria subCriteria = subCriteriaIterator.next();
                AssociationPath associationPath = getSubCriteriaAssociationPath(subCriteria);
               
                pathToCriteriaMap.put(associationPath, subCriteria);
            }
      } else {
View Full Code Here


     */
    private AssociationPath getSubCriteriaAssociationPath(Subcriteria subCriteria){
        List<AssociationPathElement> elementList = new ArrayList<AssociationPathElement>();
        elementList.add(new AssociationPathElement(subCriteria.getPath()));
       
        Subcriteria currentSubCriteria = subCriteria;
       
        while (currentSubCriteria.getParent() != null
                && Subcriteria.class.isAssignableFrom(currentSubCriteria.getParent().getClass())) {
            currentSubCriteria = Subcriteria.class.cast(currentSubCriteria.getParent());
            elementList.add(0, new AssociationPathElement(currentSubCriteria.getPath()));
        }
       
        return new AssociationPath(elementList.toArray(new AssociationPathElement[0]));
    }
View Full Code Here

TOP

Related Classes of org.hibernate.impl.CriteriaImpl.Subcriteria

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.