protected void addOrders(CriteriaBuilder criteriaBuilder, Root<T> root, CriteriaQuery<T> criteriaQuery, Map<String, OrderType> orders) {
		
		// Si la liste est vide
		if(orders == null || orders.size() == 0) return;
		
		// Liste d'ordres
		List<Order> lOrders = new ArrayList<Order>();
		
		// Parcours
		for (String property : orders.keySet()) {
			
			// Si la propriete est vide
			if(property == null || property.trim().length() == 0) continue;
			
			// Evaluation de la ppt
			Path<?> path = buildPropertyPathForAnyType(root, property.trim());
			
			// Obtention du Type
			OrderType type = orders.get(property);
			
			// Si le type est null
			if(type == null) continue;
			
			// Si on est en ASC
			if(type.equals(OrderType.ASC)) lOrders.add(criteriaBuilder.asc(path));
			else lOrders.add(criteriaBuilder.desc(path));
		}
		
		// Ajout
		criteriaQuery.orderBy(lOrders);
	}
protected void addOrders ( CriteriaBuilder criteriaBuilder , Root < T > root , CriteriaQuery < T > criteriaQuery , Map < String , OrderType > orders ) { if ( orders == null || orders . size ( ) == 0 ) return ; List < Order > lOrders = new ArrayList < Order > ( ) ; for ( String property : orders . keySet ( ) ) { if ( property == null || property . trim ( ) . length ( ) == 0 ) continue ; Path < ? > path = buildPropertyPathForAnyType ( root , property . trim ( ) ) ; OrderType type = orders . get ( property ) ; if ( type == null ) continue ; if ( type . equals ( OrderType . ASC ) ) lOrders . add ( criteriaBuilder . asc ( path ) ) ; else lOrders . add ( criteriaBuilder . desc ( path ) ) ; } criteriaQuery . orderBy ( lOrders ) ; }
Méthode de chargement des ordres
@param criteriaBuilder Constructeur de criteres
@param root Objet racine
@param criteriaQuery	Requete de critères
@param orders	 Liste des ordres