[hibernate-commits] Hibernate SVN: r17233 - jpa-api/trunk/src/main/java/javax/persistence/criteria.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Aug 5 14:10:41 EDT 2009
Author: steve.ebersole at jboss.com
Date: 2009-08-05 14:10:41 -0400 (Wed, 05 Aug 2009)
New Revision: 17233
Modified:
jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java
Log:
revert to the class-type-hiding method signatures of attribute-name (string-based) joins, and applied same to fetches for consistency (on assumption spec group will change that)
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java 2009-08-05 17:36:36 UTC (rev 17232)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java 2009-08-05 18:10:41 UTC (rev 17233)
@@ -9,8 +9,8 @@
* Represents an element of the from clause which may
* function as the parent of Fetches.
*
- * @param <Z>
- * @param <X>
+ * @param <Z> The type of the fetch source
+ * @param <X> The type of the fetched attribute/association
*/
public interface FetchParent<Z, X> {
@@ -58,24 +58,32 @@
//String-based:
/**
- * Fetch join to the specified attribute using an inner join.
- * @param attributeName name of the attribute for the
+ * Fetch join to the specified attribute using an inner join.
+ *
+ * @param <X> The type of the source of the fetch; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link FetchParent}; the expectation is that the two types match.
+ * @param <Y> The type of the fetched attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting fetch join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting fetch join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> Fetch<X, Y> fetch(String attributeName);
+ <X, Y> Fetch<X, Y> fetch(String attributeName);
/**
- * Fetch join to the specified attribute using the given
- * join type.
- * @param attributeName name of the attribute for the
+ * Fetch join to the specified attribute using the given
+ * join type.
+ *
+ * @param <X> The type of the source of the fetch; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link FetchParent}; the expectation is that the two types match.
+ * @param <Y> The type of the fetched attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
* @param jt join type
* @return the resulting fetch join
* @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> Fetch<X, Y> fetch(String attributeName, JoinType jt);
+ <X, Y> Fetch<X, Y> fetch(String attributeName, JoinType jt);
}
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java 2009-08-05 17:36:36 UTC (rev 17232)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java 2009-08-05 18:10:41 UTC (rev 17233)
@@ -115,117 +115,159 @@
//String-based:
/**
- * Join to the specified attribute using an inner join.
- * @param attributeName name of the attribute for the
+ * Join to the specified attribute using an inner join.
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> Join<X, Y> join(String attributeName);
+ <X, Y> Join<X, Y> join(String attributeName);
/**
* Join to the specified Collection-valued attribute using an
* inner join.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> CollectionJoin<X, Y> joinCollection(String attributeName);
+ <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName);
/**
* Join to the specified Set-valued attribute using an inner
* join.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> SetJoin<X, Y> joinSet(String attributeName);
+ <X, Y> SetJoin<X, Y> joinSet(String attributeName);
/**
* Join to the specified List-valued attribute using an inner
* join.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> ListJoin<X, Y> joinList(String attributeName);
+ <X, Y> ListJoin<X, Y> joinList(String attributeName);
/**
* Join to the specified Map-valued attribute using an inner
* join.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <K> The type of the key of the joined map.
+ * @param <V> The type of the value of the joined map.
+ * @param attributeName name of the attribute for the
* target of the join
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <K, V> MapJoin<X, K, V> joinMap(String attributeName);
+ <X, K, V> MapJoin<X, K, V> joinMap(String attributeName);
/**
* Join to the specified attribute using the given
- * join type.
- * @param attributeName name of the attribute for the
+ * join type.
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @param jt join type
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @param jt join type
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> Join<X, Y> join(String attributeName, JoinType jt);
+ <X, Y> Join<X, Y> join(String attributeName, JoinType jt);
/**
* Join to the specified Collection-valued attribute using
* the given join type.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @param jt join type
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @param jt join type
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt);
+ <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt);
/**
* Join to the specified Set-valued attribute using
* the given join type.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @param jt join type
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @param jt join type
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt);
+ <X, Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt);
/**
* Join to the specified List-valued attribute using
* the given join type.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <Y> The type of the joined attribute/association
+ * @param attributeName name of the attribute for the
* target of the join
- * @param jt join type
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @param jt join type
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt);
+ <X, Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt);
/**
* Join to the specified Map-valued attribute using
* the given join type.
- * @param attributeName name of the attribute for the
+ *
+ * @param <X> The type of the source of the join; note that this method-local <X> hides the <X> defined as a type
+ * param to {@link From}; the expectation is that the two types match.
+ * @param <K> The type of the key of the joined map.
+ * @param <V> The type of the value of the joined map.
+ * @param attributeName name of the attribute for the
* target of the join
- * @param jt join type
- * @return the resulting join
- * @throws IllegalArgumentException if attribute of the given
+ * @param jt join type
+ * @return the resulting join
+ * @throws IllegalArgumentException if attribute of the given
* name does not exist
*/
- <K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt);
+ <X, K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt);
}
More information about the hibernate-commits
mailing list