mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
replaced Comparable<?> with Comparable
This commit is contained in:
parent
6718fb3a65
commit
1ea8ef20d2
@ -34,14 +34,12 @@ public class SimplePathFactory implements PathFactory {
|
||||
private long counter = 0;
|
||||
|
||||
private final Map<Object,PBooleanArray> baToPath = new PathFactory<Object,PBooleanArray>(new Transformer<Object,PBooleanArray>(){
|
||||
@SuppressWarnings("unchecked")
|
||||
public PBooleanArray transform(Object arg) {
|
||||
return new PBooleanArray(md());
|
||||
}
|
||||
});
|
||||
|
||||
private final Map<Object,PComparableArray<?>> caToPath = new PathFactory<Object,PComparableArray<?>>(new Transformer<Object,PComparableArray<?>>(){
|
||||
@SuppressWarnings("unchecked")
|
||||
public PComparableArray<?> transform(Object arg) {
|
||||
return new PComparableArray(((List)arg).get(0).getClass(), md());
|
||||
}
|
||||
|
||||
@ -15,7 +15,8 @@ import com.mysema.query.util.Assert;
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
public class OrderSpecifier<A extends Comparable<?>> {
|
||||
@SuppressWarnings("unchecked")
|
||||
public class OrderSpecifier<A extends Comparable> {
|
||||
private final Order order;
|
||||
private final Expr<A> target;
|
||||
|
||||
|
||||
@ -88,7 +88,9 @@ public abstract class Expr<D>{
|
||||
}
|
||||
public final EBoolean or(EBoolean right) {return Grammar.or(this, right);}
|
||||
}
|
||||
public static abstract class EComparable<D extends Comparable<?>> extends ESimple<D>{
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static abstract class EComparable<D extends Comparable> extends ESimple<D>{
|
||||
private OrderSpecifier<D> asc;
|
||||
private OrderSpecifier<D> desc;
|
||||
private EString stringCast;
|
||||
|
||||
@ -133,7 +133,8 @@ public interface Path<C> {
|
||||
EComparable<Integer> size();
|
||||
}
|
||||
|
||||
public static class PComparable<D extends Comparable<?>> extends EComparable<D> implements Path<D>{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static class PComparable<D extends Comparable> extends EComparable<D> implements Path<D>{
|
||||
private EBoolean isnull, isnotnull;
|
||||
private final PathMetadata<?> metadata;
|
||||
private final Path<?> root;
|
||||
@ -197,7 +198,8 @@ public interface Path<C> {
|
||||
}
|
||||
}
|
||||
|
||||
public static class PComparableArray<D extends Comparable<?>> extends PArray<D>{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static class PComparableArray<D extends Comparable> extends PArray<D>{
|
||||
public PComparableArray(Class<D> type, PathMetadata<?> metadata) {
|
||||
super(type, metadata);
|
||||
}
|
||||
|
||||
@ -19,7 +19,6 @@ import com.mysema.query.grammar.OrderSpecifier;
|
||||
* @param <A>
|
||||
*/
|
||||
public class SubQuery<JM,A> extends Expr<A> implements Query<SubQuery<JM,A>>, CollectionType<A>{
|
||||
@SuppressWarnings("unchecked")
|
||||
private QueryWithPublicSelect<JM> query = new QueryWithPublicSelect<JM>();
|
||||
public SubQuery(Expr<A> select) {
|
||||
super(null);
|
||||
@ -28,7 +27,6 @@ public class SubQuery<JM,A> extends Expr<A> implements Query<SubQuery<JM,A>>, Co
|
||||
public SubQuery(){
|
||||
super(null);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
public SubQuery<JM,A> from(Expr<?>... o) {query.from(o); return this;}
|
||||
public SubQuery<JM,A> fullJoin(Expr<?> o) {query.fullJoin(o); return this;}
|
||||
public QueryBase<JM,?> getQuery(){ return query;}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user