Document History

Date

Author

Version Description & Notes

04 November 2011

Gordon Yorke

Initial Doc creation

26 October 2012

Chris Delahunt

feature completed

Project overview

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

Concepts

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.

Requirements

Support Criteria bulk update/delete functionality through the implementation of the new CriteriaBuilder APIs, EntityManager APIs, CriteriaUpdate and CriteriaDelete.

Design Constraints

Design / Functionality

Testing

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.

API

GUI

Config files

Documentation

Work Required

Implement specification API

approx 3 day

Testing

approx 2 days

Open Issues

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.

Decisions

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

Future Considerations

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.