<dependency>
<groupId>com.taocares.commons</groupId>
<artifactId>commons-jpa</artifactId>
</dependency>
Specification<EntityType> specification = SpecificationFactory.getSpecification(qo);
List<EntityType> result = repository.findAll(specification);
class Foo {
String name;
Date createTime;
Bar bar;
}
class FooQo {
@QueryCondition
String name;
@QueryCondition(field="bar.name")
String barName;
@QueryCondition(field="createTime", type=ConditionType.NOT_LESS_THAN)
Date createTimeStart;
@QueryCondition(field="createTime", type=ConditionType.NOT_GREATER_THAN)
Date createTimeEnd;
}