资 源 简 介
CiQUTa is a set of utilities to perform queries on Collections and on other data structures using well known Hibernate style idioms as QueryByExample, Criteria and HQL.
An example is worth 1000 words
Have you ever found a piece of code like that, to extract some useful data from a Collection ?
List result = new ArrayList();for(Iterator i = catalog.cars.iterator(); i.hasNext(); ){ Car car = (Car)i.next(); if( car.getModel().equals("518") && car.getMaker().getName().equals("BMW") ){ result.add(car); }}
Would you like instead to use that alternative way to obtain the very same result ?
List result = CriteriaImpl .forCollection(catalog.cars) .add(Restrictions.eq("model", "518")) .add(Restrictions.eq("maker.name", "BMW")) .list();
If the answer is "yes", give CiQUTa