db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tilma...@apache.org
Subject [db-jdo] branch master updated: JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery (#4)
Date Thu, 25 Apr 2019 16:41:51 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new d23c2c1  JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated
subquery (#4)
d23c2c1 is described below

commit d23c2c116c74bb389df9993c95968eb19235e895
Author: Michael Bouschen <mbo@apache.org>
AuthorDate: Thu Apr 25 18:41:46 2019 +0200

    JDO-778: Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery
(#4)
---
 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.


Mime
View raw message