[jira] [Comment Edited] (JDO-652) Provision of a typesafe refactor-friendly query capability for JDOQL

2015-09-08 Thread Andy Jefferson (JIRA)

[ 
https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14735201#comment-14735201
 ] 

Andy Jefferson edited comment on JDO-652 at 9/8/15 5:53 PM:


What remains on this issue :

1. spec : I don't mind contributing some text. The problem is that most of Ch14 
is based around javax.jdo.Query. What I suggest would be updates to 14.1 to 
mention about JDOQLTypedQuery, an update to Ch14.5 to add the 
newJDOQLTypedQuery() method. Then insert a new section 14.10 before "Examples" 
to discuss solely the JDOQLTypedQuery interface. Finally update the "Examples" 
section to add some examples at the end. Other ideas? Alternately put the new 
section after examples, and have its examples inline with the various method 
descriptions.

2. tck : this needs tests. I am not the best person to write these since I've 
written the majority of the API, and the implementation. Volunteer?


was (Author: andy):
What remains on this issue :

1. spec : I don't mind contributing some text. What I suggest would be an 
update to Ch14.5 to add the newJDOQLTypedQuery() method. Then insert a new 
section 14.6 before "SQL Queries" to discuss solely the JDOQLTypedQuery 
interface. Finally update the "Examples" section to add some examples at the 
end. Other ideas?

2. tck : this needs tests. I am not the best person to write these since I've 
written the majority of the API, and the implementation. Volunteer?

> Provision of a typesafe refactor-friendly query capability for JDOQL
> 
>
> Key: JDO-652
> URL: https://issues.apache.org/jira/browse/JDO-652
> Project: JDO
>  Issue Type: New Feature
>  Components: api, specification, tck
>Reporter: Andy Jefferson
> Fix For: JDO 3.2
>
> Attachments: typesafe.patch, typesafe_manifest.patch
>
>
> There are various querying capabilities of this type around. JPA2 has its 
> Criteria query API. Third party solutions like QueryDSL also exist, in its 
> case providing a JDOQL implementation (as well as JPQL, and HQL). We should 
> seriously consider introducing something along these lines in the JDO2.4 
> timeframe. 
> There is a comparison of JPA Criteria with QueryDSL over at 
> http://source.mysema.com/forum/mvnforum/viewthread_thread,49



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JDO-652) Provision of a typesafe refactor-friendly query capability for JDOQL

2015-09-08 Thread Andy Jefferson (JIRA)

[ 
https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14735201#comment-14735201
 ] 

Andy Jefferson commented on JDO-652:


What remains on this issue :

1. spec : I don't mind contributing some text. What I suggest would be an 
update to Ch14.5 to add the newJDOQLTypedQuery() method. Then insert a new 
section 14.6 before "SQL Queries" to discuss solely the JDOQLTypedQuery 
interface. Finally update the "Examples" section to add some examples at the 
end. Other ideas?

2. tck : this needs tests. I am not the best person to write these since I've 
written the majority of the API, and the implementation. Volunteer?

> Provision of a typesafe refactor-friendly query capability for JDOQL
> 
>
> Key: JDO-652
> URL: https://issues.apache.org/jira/browse/JDO-652
> Project: JDO
>  Issue Type: New Feature
>  Components: api, specification, tck
>Reporter: Andy Jefferson
> Fix For: JDO 3.2
>
> Attachments: typesafe.patch, typesafe_manifest.patch
>
>
> There are various querying capabilities of this type around. JPA2 has its 
> Criteria query API. Third party solutions like QueryDSL also exist, in its 
> case providing a JDOQL implementation (as well as JPQL, and HQL). We should 
> seriously consider introducing something along these lines in the JDO2.4 
> timeframe. 
> There is a comparison of JPA Criteria with QueryDSL over at 
> http://source.mysema.com/forum/mvnforum/viewthread_thread,49



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JDO-734) Ability to save a (created) query as a named query for later use

2015-09-08 Thread Andy Jefferson (JIRA)

[ 
https://issues.apache.org/jira/browse/JDO-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14735308#comment-14735308
 ] 

Andy Jefferson commented on JDO-734:


Spec update is in SVN as is this test. Any more to do? otherwise mark as 
resolved

> Ability to save a (created) query as a named query for later use
> 
>
> Key: JDO-734
> URL: https://issues.apache.org/jira/browse/JDO-734
> Project: JDO
>  Issue Type: New Feature
>  Components: api, specification, tck
>Reporter: Andy Jefferson
> Fix For: JDO 3.2
>
> Attachments: JDO-734.api.patch, SaveAsNamedQuery.java
>
>
> When a user goes to the trouble of creating a query to retrieve some 
> information it is a common enough scenario that this will need to be 
> performed again during the application lifetime. Being able to save a query 
> (once created) as a named query (in the PMF) would mean that applications can 
> skip the generation step off for subsequent runs.
> Suggested API change would be to add a single method to Query.
> Query q = pm1.newQuery("SELECT p FROM Person p WHERE firstName == :param");
> q.saveAsNamedQuery("PeopleWithName");
> q.execute("John");
> ... (some time later)
> Query q = pm2.newNamedQuery(Person.class, "PeopleWithName");
> q.execute("Brian");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)