Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/DesignDocs/350728"

(New page: <div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div> = Design Specification: <feature-name> = [http://bugs.eclipse.org/350728 ER 350728] == Document His...)
 
Line 1: Line 1:
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>
= Design Specification: <feature-name> =
+
= Design Specification: Dynamic Named Query definition =
  
 
[http://bugs.eclipse.org/350728 ER 350728]
 
[http://bugs.eclipse.org/350728 ER 350728]
Line 11: Line 11:
 
! Version Description & Notes
 
! Version Description & Notes
 
|-  
 
|-  
|  
+
| 08 November 2011
|  
+
| Gordon Yorke
|  
+
| initial document creation
 
|}
 
|}
  
 
== Project overview ==
 
== Project overview ==
  
Overview of the project/feature. Why is it desired, what are its goals.
+
With JPA 2.1 the specification has included API to allow dynamically creating named queries and storing these class names for later use.
 
+
Goals:
+
* goal 1
+
* goal 2
+
  
 
== Concepts ==
 
== Concepts ==
  
Present any concepts relevant to the feature.
+
Within JPA users can statically define Named Queries using annotations or XML.  These queries can then be accessed by name from the Entity Manager and executed.  This new API allows the Named Query to be defined at runtime and stored in the Persistence Unit.
  
 
== Requirements ==
 
== Requirements ==
 
+
Implement EntityManagerFactory.addNamedQuery APIs.
The following sections will expand the goals of this project into more concrete requirements.
+
Ensure any configuration of the query object(ie max results, hints, flush mode, lock mode,etc) (except for actual parameter binding) in effect when the named query is added is retained as part of the named query definition.
 +
If a named query of the same name has been previously defined, either statically via metadata or via this method, that query definition is replaced.
  
 
== Design Constraints ==
 
== Design Constraints ==

Revision as of 12:13, 8 November 2011

Design Specification: Dynamic Named Query definition

ER 350728

Document History

Date Author Version Description & Notes
08 November 2011 Gordon Yorke initial document creation

Project overview

With JPA 2.1 the specification has included API to allow dynamically creating named queries and storing these class names for later use.

Concepts

Within JPA users can statically define Named Queries using annotations or XML. These queries can then be accessed by name from the Entity Manager and executed. This new API allows the Named Query to be defined at runtime and stored in the Persistence Unit.

Requirements

Implement EntityManagerFactory.addNamedQuery APIs. Ensure any configuration of the query object(ie max results, hints, flush mode, lock mode,etc) (except for actual parameter binding) in effect when the named query is added is retained as part of the named query definition. If a named query of the same name has been previously defined, either statically via metadata or via this method, that query definition is replaced.

Design Constraints

Design / Functionality

Testing

API

GUI

Config files

Documentation

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

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.

Back to the top