资 源 简 介
Tired of writing SQL in Java? Afraid with fragility of named queries? Want to write metadata based type-safe queries, but lost in verbose JPA api? Then this is the framework for you. Now you can write metadata based, type-safe, debugable, readable, and maintainable queries in Object Oriented way. No prior knowledge of SQL or JPA required.
Example 1:
For SQL : select person.name, sum(course.unit) from person inner join course_session inner join course group by person.name
You need to do this using this framework:
CriteriaComposer forStudentUnitCount = CriteriaComposer.createComposer(Person.class).select(Person_.name).groupBy(Person_.name);
forStudentUnitCount.join(Person_.courseSessions).join(CourseSession_.course).select(AggregateFunction.SUM, Course_.unit);
List result = criteriaProcessor.findAllTuple(forStudentUnitCount);
---
Example 2:
FOR SQL: select * from course where course.last_upda