diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java b/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java index 56f88b9ff..b457bf765 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java @@ -25,8 +25,7 @@ import com.querydsl.core.support.FetchableQueryBase; import com.querydsl.core.types.*; /** - * AbstractCollQuery provides a base class for Collection query implementations. - * + * {@code AbstractCollQuery} provides a base class for {@link Collection} query implementations. * * @see CollQuery * @@ -72,10 +71,10 @@ public abstract class AbstractCollQuery> ex /** * Add a query source * - * @param + * @param type of expression * @param entity Path for the source * @param col content of the source - * @return + * @return current object */ public Q from(Path entity, Iterable col) { iterables.put(entity, col); @@ -86,10 +85,10 @@ public abstract class AbstractCollQuery> ex /** * Bind the given collection to an already existing query source * - * @param + * @param type of expression * @param entity Path for the source * @param col content of the source - * @return + * @return current object */ public Q bind(Path entity, Iterable col) { iterables.put(entity, col); @@ -123,10 +122,10 @@ public abstract class AbstractCollQuery> ex /** * Define an inner join from the Collection typed path to the alias * - * @param

- * @param target - * @param alias - * @return + * @param

type of expression + * @param target target of the join + * @param alias alias for the join target + * @return current object */ public

Q innerJoin(Path> target, Path

alias) { getMetadata().addJoin(JoinType.INNERJOIN, createAlias(target, alias)); @@ -136,10 +135,10 @@ public abstract class AbstractCollQuery> ex /** * Define an inner join from the Map typed path to the alias * - * @param

- * @param target - * @param alias - * @return + * @param

type of expression + * @param target target of the join + * @param alias alias for the join target + * @return current object */ public

Q innerJoin(MapExpression target, Path

alias) { getMetadata().addJoin(JoinType.INNERJOIN, createAlias(target, alias)); @@ -149,10 +148,10 @@ public abstract class AbstractCollQuery> ex /** * Define a left join from the Collection typed path to the alias * - * @param

- * @param target - * @param alias - * @return + * @param

type of expression + * @param target target of the join + * @param alias alias for the join target + * @return current object */ public

Q leftJoin(Path> target, Path

alias) { getMetadata().addJoin(JoinType.LEFTJOIN, createAlias(target, alias)); @@ -162,10 +161,10 @@ public abstract class AbstractCollQuery> ex /** * Define a left join from the Map typed path to the alias * - * @param

- * @param target - * @param alias - * @return + * @param

type of expression + * @param target target of the join + * @param alias alias for the joint target + * @return current object */ public

Q leftJoin(MapExpression target, Path

alias) { getMetadata().addJoin(JoinType.LEFTJOIN, createAlias(target, alias)); @@ -204,7 +203,6 @@ public abstract class AbstractCollQuery> ex reset(); return QueryResults.emptyResults(); } - } @Override diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollDeleteClause.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollDeleteClause.java index 30a6662ff..d88ebf8f2 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollDeleteClause.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollDeleteClause.java @@ -20,7 +20,7 @@ import com.querydsl.core.types.Path; import com.querydsl.core.types.Predicate; /** - * CollDeleteClause is an implementation of the {@link DeleteClause} interface for the Querydsl + * {@code CollDeleteClause} is an implementation of the {@link DeleteClause} interface for the Querydsl * Collections module * * @author tiwe @@ -31,13 +31,10 @@ public class CollDeleteClause implements DeleteClause> { private final Collection col; - private final Path expr; - private final CollQuery query; public CollDeleteClause(QueryEngine qe, Path expr, Collection col) { this.query = new CollQuery(qe).from(expr, col).select(expr); - this.expr = expr; this.col = col; } diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQuery.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQuery.java index cafff9eba..8bd4757de 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQuery.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQuery.java @@ -17,7 +17,7 @@ import com.querydsl.core.*; import com.querydsl.core.types.Expression; /** - * CollQuery is the default implementation of the {@link SimpleQuery} interface for collections + * {@code CollQuery} is the default implementation of the {@link FetchableQuery} interface for collections * * @author tiwe * @@ -34,7 +34,7 @@ public class CollQuery extends AbstractCollQuery> implements /** * Creates a new CollQuery instance * - * @param templates + * @param templates serialization templates */ public CollQuery(CollQueryTemplates templates) { this(new DefaultQueryEngine(new DefaultEvaluatorFactory(templates))); @@ -43,7 +43,7 @@ public class CollQuery extends AbstractCollQuery> implements /** * Create a new CollQuery instance * - * @param queryEngine + * @param queryEngine query engine for query execution */ public CollQuery(QueryEngine queryEngine) { super(new DefaultQueryMetadata(), queryEngine); @@ -53,7 +53,7 @@ public class CollQuery extends AbstractCollQuery> implements /** * Create a new CollQuery instance * - * @param metadata + * @param metadata query metadata */ public CollQuery(QueryMetadata metadata) { super(metadata, DefaultQueryEngine.getDefault()); @@ -62,8 +62,8 @@ public class CollQuery extends AbstractCollQuery> implements /** * Create a new CollQuery instance * - * @param metadata - * @param queryEngine + * @param metadata query metadata + * @param queryEngine query engine for query execution */ public CollQuery(QueryMetadata metadata, QueryEngine queryEngine) { super(metadata, queryEngine); diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFactory.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFactory.java index 4c1833e04..407423631 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFactory.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFactory.java @@ -20,7 +20,7 @@ import com.querydsl.core.alias.Alias; import com.querydsl.core.types.Path; /** - * CollQueryFactory provides static convenience methods for query construction + * {@code CollQueryFactory} provides static convenience methods for query construction * * @author tiwe */ @@ -31,7 +31,7 @@ public final class CollQueryFactory { * * @param path source expression * @param col source collection - * @return + * @return delete clause */ public static CollDeleteClause delete(Path path, Collection col) { return new CollDeleteClause(path, col); @@ -42,7 +42,7 @@ public final class CollQueryFactory { * * @param alias source alias * @param col source collection - * @return + * @return query */ public static CollQuery from(A alias, Iterable col) { Path expr = Alias.$(alias); @@ -54,7 +54,7 @@ public final class CollQueryFactory { * * @param path source expression * @param arr source array - * @return + * @return query */ public static CollQuery from(Path path, A... arr) { return new CollQuery().from(path, ImmutableList.copyOf(arr)).select(path); @@ -65,7 +65,7 @@ public final class CollQueryFactory { * * @param path source expression * @param col source collection - * @return + * @return query */ public static CollQuery from(Path path, Iterable col) { return new CollQuery().from(path, col).select(path); @@ -76,7 +76,7 @@ public final class CollQueryFactory { * * @param path source expression * @param col source collection - * @return + * @return query */ public static CollUpdateClause update(Path path, Iterable col) { return new CollUpdateClause(path, col); diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java index 430e4c9bc..b51f287c3 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java @@ -27,7 +27,7 @@ import com.querydsl.core.util.MathUtils; import com.querydsl.core.util.ReflectionUtils; /** - * CollQueryFunctions defines function implementation for use in ColQueryTemplates + * {@code CollQueryFunctions} defines function implementation for use in ColQueryTemplates * * @author tiwe * diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryMixin.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryMixin.java index 796007307..d48ca7506 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryMixin.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryMixin.java @@ -22,7 +22,7 @@ import com.querydsl.core.types.Predicate; import com.querydsl.core.types.dsl.Expressions; /** - * CollQueryMixin extends {@link QueryMixin} to provide normalization logic specific to this module + * {@code CollQueryMixin} extends {@link QueryMixin} to provide normalization logic specific to this module * * @author tiwe * diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQuerySerializer.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQuerySerializer.java index f9fb98aa7..c113bdffb 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQuerySerializer.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQuerySerializer.java @@ -42,7 +42,7 @@ import com.querydsl.core.types.SubQueryExpression; import com.querydsl.core.types.Template; /** - * CollQuerySerializer is a {@link Serializer} implementation for the Java language + * {@code CollQuerySerializer} is a {@link Serializer} implementation for the Java language * * @author tiwe */ diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryTemplates.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryTemplates.java index ea9061662..1617229aa 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryTemplates.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollQueryTemplates.java @@ -18,7 +18,7 @@ import com.querydsl.core.types.Ops; import com.querydsl.core.types.PathType; /** - * CollQueryTemplates extends {@link JavaTemplates} to add module specific operation + * {@code CollQueryTemplates} extends {@link JavaTemplates} to add module specific operation * templates. * * @author tiwe diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/CollUpdateClause.java b/querydsl-collections/src/main/java/com/querydsl/collections/CollUpdateClause.java index 2bc885971..58be8c998 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/CollUpdateClause.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/CollUpdateClause.java @@ -24,7 +24,7 @@ import com.querydsl.core.types.Predicate; import com.querydsl.core.util.BeanMap; /** - * CollUpdateClause is an implementation of the UpdateClause interface for Querydsl Collections + * {@code CollUpdateClause} is an implementation of the {@link UpdateClause} interface for Querydsl Collections * * @author tiwe * @@ -32,15 +32,12 @@ import com.querydsl.core.util.BeanMap; */ public class CollUpdateClause implements UpdateClause> { - private final Path expr; - private final Map, Object> paths = new HashMap, Object>(); private final CollQuery query; public CollUpdateClause(QueryEngine qe, Path expr, Iterable col) { this.query = new CollQuery(qe).from(expr, col).select(expr); - this.expr = expr; } public CollUpdateClause(Path expr, Iterable col) { diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/DefaultEvaluatorFactory.java b/querydsl-collections/src/main/java/com/querydsl/collections/DefaultEvaluatorFactory.java index b8c6f2188..8b6b1c8c6 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/DefaultEvaluatorFactory.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/DefaultEvaluatorFactory.java @@ -43,7 +43,7 @@ import com.querydsl.core.types.ParamNotSetException; import com.querydsl.core.types.Predicate; /** - * DefaultEvaluatorFactory provides Java source templates for evaluation of CollQuery queries + * {@code DefaultEvaluatorFactory} provides Java source templates for evaluation of {@link CollQuery} queries * * @author tiwe * @@ -86,9 +86,10 @@ public class DefaultEvaluatorFactory { * Create an Evaluator for the given query sources and projection * * @param - * @param sources - * @param projection - * @return + * @param metadata query metadata + * @param sources sources of the query + * @param projection projection of the query + * @return evaluator */ public Evaluator create(QueryMetadata metadata, List> sources, Expression projection) { @@ -129,9 +130,9 @@ public class DefaultEvaluatorFactory { * Create an Evaluator for the given source and filter * * @param - * @param source - * @param filter - * @return + * @param source source of the query + * @param filter filter of the query + * @return evaluator */ public Evaluator> createEvaluator(QueryMetadata metadata, Expression source, Predicate filter) { @@ -165,9 +166,10 @@ public class DefaultEvaluatorFactory { /** * Create an Evaluator for the given sources and the given optional filter * - * @param joins - * @param filter - * @return + * @param metadata query metadata + * @param joins joins + * @param filter where condition + * @return evaluator */ public Evaluator> createEvaluator(QueryMetadata metadata, List joins, @Nullable Predicate filter) { diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/EvaluatorFunction.java b/querydsl-collections/src/main/java/com/querydsl/collections/EvaluatorFunction.java index 573c795c7..515e0ac81 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/EvaluatorFunction.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/EvaluatorFunction.java @@ -34,7 +34,7 @@ public class EvaluatorFunction implements Function { if (input.getClass().isArray()) { return ev.evaluate((Object[]) input); } else { - return ev.evaluate(new Object[]{input}); + return ev.evaluate(input); } } } diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java b/querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java index 6e581204e..06bb00687 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java @@ -24,7 +24,7 @@ import com.querydsl.core.types.PathExtractor; import com.querydsl.core.types.Predicate; /** - * GuavaHelpers provides functionality to wrap Querydsl {@link Predicate} instances to Guava predicates + * {@code GuavaHelpers} provides functionality to wrap Querydsl {@link Predicate} instances to Guava predicates * and Querydsl {@link Expression} instances to Guava functions * * @author tiwe @@ -38,8 +38,8 @@ public final class GuavaHelpers { /** * Wrap a Querydsl predicate into a Guava predicate * - * @param predicate - * @return + * @param predicate predicate to wrapped + * @return Guava predicate */ public static com.google.common.base.Predicate wrap(Predicate predicate) { Path path = predicate.accept(PathExtractor.DEFAULT, null); @@ -59,8 +59,8 @@ public final class GuavaHelpers { /** * Wrap a Querydsl expression into a Guava function * - * @param projection - * @return + * @param projection projection to wrap + * @return Guava function */ public static Function wrap(Expression projection) { Path path = projection.accept(PathExtractor.DEFAULT, null); diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/MultiComparator.java b/querydsl-collections/src/main/java/com/querydsl/collections/MultiComparator.java index ed1dab1c0..e24aa8427 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/MultiComparator.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/MultiComparator.java @@ -20,7 +20,7 @@ import com.mysema.codegen.Evaluator; import com.querydsl.core.util.NullSafeComparableComparator; /** - * MultiComparator compares arrays + * {@code MultiComparator} compares arrays * * @author tiwe */ diff --git a/querydsl-collections/src/main/java/com/querydsl/collections/QueryEngine.java b/querydsl-collections/src/main/java/com/querydsl/collections/QueryEngine.java index 0d4424615..19a58e77a 100644 --- a/querydsl-collections/src/main/java/com/querydsl/collections/QueryEngine.java +++ b/querydsl-collections/src/main/java/com/querydsl/collections/QueryEngine.java @@ -20,7 +20,7 @@ import com.querydsl.core.QueryMetadata; import com.querydsl.core.types.Expression; /** - * QueryEngine defines an interface for the evaluation of ColQuery queries + * {@code QueryEngine} defines an interface for the evaluation of ColQuery queries * * @author tiwe * @@ -30,26 +30,28 @@ public interface QueryEngine { /** * Evaluate the given query and return the count of matched rows * - * @param metadata - * @param iterables - * @return + * @param metadata query metadata + * @param iterables source contents + * @return matching row count */ long count(QueryMetadata metadata, Map, Iterable> iterables); /** * Evaluate the given query and return the projection as a list * - * @param metadata - * @param iterables - * @return + * @param metadata query metadata + * @param iterables source contents + * @return matching rows */ List list(QueryMetadata metadata, Map, Iterable> iterables, Expression projection); /** - * @param metadata - * @param iterables - * @return + * Evaluate the given query return whether rows where matched + * + * @param metadata query metadata + * @param iterables source contents + * @return true, if at least one row was matched */ boolean exists(QueryMetadata metadata, Map, Iterable> iterables);