- 1 Design Specification: JPA 2.1 Criteria Query framework Bulk Update/Delete support
Design Specification: JPA 2.1 Criteria Query framework Bulk Update/Delete support
|Date||Author||Version Description & Notes|
|04 November 2011||Gordon Yorke||Initial Doc creation|
|26 October 2012||Chris Delahunt||feature completed|
The next iteration of the Java Persistence API specification has added addition support for Bulk Update/Delete operations to the Criteria framework. This enhancement will cover the work involved to realize the implementation of this support
The Criteria framework is an API for creating typesafe and/or dynamic Java Persistence queries. Similar in style to the EclipseLink Query and Expression framework. In previous version of the specification support for "UPDATE Employee e SET e.salary = :salary" and similar delete JPQL was not available using the Criteria API. Through the addition of CriteriaUpdate/CriteriaDelete classes support for bulk update/delete queries has now been added.
Support Criteria bulk update/delete functionality through the implementation of the new CriteriaBuilder APIs, EntityManager APIs, CriteriaUpdate and CriteriaDelete.
Design / Functionality
CriteriaQueryMetamodelTestSuite added to test queries using bulk queries against the metamodel while tests added to jpa21.advanced.CriteriaQueryTestSuite to more generally test criteria api expressions against the equivalent JPQL and expected results.
- Implement specification API
- approx 3 day
- approx 2 days
This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.
|Issue #||Owner||Description / Notes|
|1||Because of the changes to the APIs the implementation will need a creative way to remain backward compatible. One option is a pluggable EntityManagerFactory that checks for the new APIs and if present produces the correct EntityManagerImpl for the libraries on the classpath.|
This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.
|Issue #||Description / Notes||Decision|
During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.