Not that I have any objections, but I am wondering what good does it do for you to subclass Ordering?
Andrus On Aug 1, 2013, at 6:03 PM, johnth...@apache.org wrote: > Author: johnthuss > Date: Thu Aug 1 15:03:33 2013 > New Revision: 1509274 > > URL: http://svn.apache.org/r1509274 > Log: > Allow an Ordering subclass to be used where Ordering is accepted > > Modified: > > cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java > > Modified: > cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java > URL: > http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java?rev=1509274&r1=1509273&r2=1509274&view=diff > ============================================================================== > --- > cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java > (original) > +++ > cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java > Thu Aug 1 15:03:33 2013 > @@ -91,7 +91,7 @@ public class SelectQuery<T> extends Qual > * > * @since 3.2 > */ > - public static <T> SelectQuery<T> query(Class<T> rootClass, Expression > qualifier, List<Ordering> orderings) { > + public static <T> SelectQuery<T> query(Class<T> rootClass, Expression > qualifier, List<? extends Ordering> orderings) { > return new SelectQuery<T>(rootClass, qualifier, orderings); > } > > @@ -173,7 +173,7 @@ public class SelectQuery<T> extends Qual > * defines how to order the results, may be null. > * @since 3.1 > */ > - public SelectQuery(ObjEntity root, Expression qualifier, List<Ordering> > orderings) { > + public SelectQuery(ObjEntity root, Expression qualifier, List<? extends > Ordering> orderings) { > this(); > this.init(root, qualifier); > addOrderings(orderings); > @@ -215,7 +215,7 @@ public class SelectQuery<T> extends Qual > * defines how to order the results, may be null. > * @since 3.1 > */ > - public SelectQuery(Class<T> rootClass, Expression qualifier, > List<Ordering> orderings) { > + public SelectQuery(Class<T> rootClass, Expression qualifier, List<? > extends Ordering> orderings) { > init(rootClass, qualifier); > addOrderings(orderings); > } > @@ -257,7 +257,7 @@ public class SelectQuery<T> extends Qual > * defines how to order the results, may be null. > * @since 3.1 > */ > - public SelectQuery(DbEntity root, Expression qualifier, List<Ordering> > orderings) { > + public SelectQuery(DbEntity root, Expression qualifier, List<? extends > Ordering> orderings) { > this(); > this.init(root, qualifier); > addOrderings(orderings); > @@ -290,7 +290,7 @@ public class SelectQuery<T> extends Qual > * defines how to order the results, may be null. > * @since 3.1 > */ > - public SelectQuery(String objEntityName, Expression qualifier, > List<Ordering> orderings) { > + public SelectQuery(String objEntityName, Expression qualifier, List<? > extends Ordering> orderings) { > init(objEntityName, qualifier); > addOrderings(orderings); > } > @@ -497,7 +497,7 @@ public class SelectQuery<T> extends Qual > /** > * Adds a list of orderings. > */ > - public void addOrderings(List<Ordering> orderings) { > + public void addOrderings(List<? extends Ordering> orderings) { > // If the supplied list of orderings is null, do not attempt to add > // to the collection (addAll() will NPE otherwise). > if (orderings != null) > > >