You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by mb...@apache.org on 2019/03/10 15:55:42 UTC

[db-jdo] branch JDO-778 created (now 61f6793)

This is an automated email from the ASF dual-hosted git repository.

mbo pushed a change to branch JDO-778
in repository https://gitbox.apache.org/repos/asf/db-jdo.git.


      at 61f6793  JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery

This branch includes the following new commits:

     new 61f6793  JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[db-jdo] 01/01: JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mbo pushed a commit to branch JDO-778
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit 61f6793eb2f081a3cffd8d7cf97214b76f236cd9
Author: Michael Bouschen <mb...@apache.org>
AuthorDate: Sun Mar 10 16:55:26 2019 +0100

    JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery
---
 api/src/main/java/javax/jdo/JDOQLTypedQuery.java | 36 +++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/api/src/main/java/javax/jdo/JDOQLTypedQuery.java b/api/src/main/java/javax/jdo/JDOQLTypedQuery.java
index da04f38..9564374 100644
--- a/api/src/main/java/javax/jdo/JDOQLTypedQuery.java
+++ b/api/src/main/java/javax/jdo/JDOQLTypedQuery.java
@@ -343,11 +343,45 @@ public interface JDOQLTypedQuery<T> extends Serializable, Closeable {
      * @param candidate Candidate for the subquery
      * @param candidateAlias Alias for the candidate
      * @return The subquery
-     * @param <S> candidate type for subquery
+     * @param <S> Candidate type for subquery
      */
     <S> JDOQLTypedSubquery<S> subquery(Class<S> candidate, String candidateAlias);
 
     /**
+     * Method to return a correlated subquery for use in this query.
+     * The candidate collection of the subquery is defined using a collection relationship of the outer query.
+     * To obtain the expression for the subquery to link it back to this query, call "result(...)" on the subquery.
+     * @param candidateCollection Expression defining the candidate collection for the subquery
+     * @param candidateAlias Alias for the candidate
+     * @return The subquery
+     * @param <E> Candidate type for subquery
+     */
+    <E> JDOQLTypedSubquery<E> subquery(CollectionExpression<Collection<E>, E> candidateCollection, String candidateAlias);
+
+    /**
+     * Method to return a correlated subquery for use in this query.
+     * The candidate collection of the subquery is defined using a list relationship of the outer query.
+     * To obtain the expression for the subquery to link it back to this query, call "result(...)" on the subquery.
+     * @param candidateList Expression defining the candidate collection for the subquery
+     * @param candidateAlias Alias for the candidate
+     * @return The subquery
+     * @param <E> Candidate type for subquery
+     */
+    <E> JDOQLTypedSubquery<E> subquery(ListExpression<List<E>, E> candidateList, String candidateAlias);
+
+    /**
+     * Method to return a correlated subquery for use in this query.
+     * The candidate collection of the subquery is defined using a map relationship of the outer query.
+     * To obtain the expression for the subquery to link it back to this query, call "result(...)" on the subquery.
+     * @param candidateMap Expression defining the candidate collection for the subquery
+     * @param candidateAlias Alias for the candidate
+     * @return The subquery
+     * @param <K> The key type of the map relationship
+     * @param <V> The value type the map relationship
+     */
+    <K, V> JDOQLTypedSubquery<Map.Entry<K, V>> subquery(MapExpression<Map<K, V>, K, V> candidateMap, String candidateAlias);
+
+    /**
      * Method to set the named parameters on this query prior to execution.
      * All parameter values specified in this method will only be retained until the subsequent query execution.
      * @param namedParamMap The map of parameter values keyed by their names.