Package org.infinispan.query

Examples of org.infinispan.query.CacheQuery.sort()


         CacheQuery cacheQuery = Search.getSearchManager( cache ).getQuery( luceneQuery );
         List<Object> found = cacheQuery.list();

         assert found.size() == 2;

         cacheQuery.sort( sort );

         found = cacheQuery.list();

         assert found.size() == 2;
         assert found.get( 0 ).equals( person2 ); // person2 is 30 and named Goat
View Full Code Here


                     break;
               }
            }
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, !sc.isAscending());
         }
         cacheQuery = cacheQuery.sort(new Sort(sortField));
      }

      int projSize = 0;
      if (projections != null && !projections.isEmpty()) {
         projSize = projections.size();
View Full Code Here

         cacheQuery = searchManager.getQuery(luceneQuery, parsingResult.getTargetEntity());
      }

      if (parsingResult.getSort() != null) {
         cacheQuery = cacheQuery.sort(parsingResult.getSort());
      }

      int projSize = 0;
      if (parsingResult.getProjections() != null && !parsingResult.getProjections().isEmpty()) {
         projSize = parsingResult.getProjections().size();
View Full Code Here

                     break;
               }
            }
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, !sc.isAscending());
         }
         cacheQuery = cacheQuery.sort(new Sort(sortField));
      }

      int projSize = 0;
      if (projections != null && !projections.isEmpty()) {
         projSize = projections.size();
View Full Code Here

         cacheQuery = searchManager.getQuery(luceneQuery, parsingResult.getTargetEntity());
      }

      if (parsingResult.getSort() != null) {
         cacheQuery = cacheQuery.sort(parsingResult.getSort());
      }

      int projSize = 0;
      if (parsingResult.getProjections() != null && !parsingResult.getProjections().isEmpty()) {
         projSize = parsingResult.getProjections().size();
View Full Code Here

                     break;
               }
            }
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, !sc.isAscending());
         }
         cacheQuery = cacheQuery.sort(new Sort(sortField));
      }

      int projSize = 0;
      if (projections != null && !projections.isEmpty()) {
         projSize = projections.size();
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.