Skip to content

Commit 1cdda23

Browse files
committed
Better name for the base where support class
1 parent ae2b10b commit 1cdda23

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

src/main/java/org/mybatis/dynamic/sql/delete/DeleteDSL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import org.mybatis.dynamic.sql.SqlTable;
2323
import org.mybatis.dynamic.sql.util.Buildable;
2424
import org.mybatis.dynamic.sql.where.AbstractWhereDSL;
25-
import org.mybatis.dynamic.sql.where.AbstractWhereSupportingDSL;
25+
import org.mybatis.dynamic.sql.where.AbstractWhereSupport;
2626
import org.mybatis.dynamic.sql.where.WhereModel;
2727

28-
public class DeleteDSL<R> extends AbstractWhereSupportingDSL<DeleteDSL<R>.DeleteWhereBuilder> implements Buildable<R> {
28+
public class DeleteDSL<R> extends AbstractWhereSupport<DeleteDSL<R>.DeleteWhereBuilder> implements Buildable<R> {
2929

3030
private final Function<DeleteModel, R> adapterFunction;
3131
private final SqlTable table;

src/main/java/org/mybatis/dynamic/sql/select/AbstractQueryExpressionDSL.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@
3232
import org.mybatis.dynamic.sql.select.join.JoinType;
3333
import org.mybatis.dynamic.sql.util.Buildable;
3434
import org.mybatis.dynamic.sql.where.AbstractWhereDSL;
35-
import org.mybatis.dynamic.sql.where.AbstractWhereSupportingDSL;
36-
37-
public abstract class AbstractQueryExpressionDSL<
38-
W extends AbstractWhereDSL<?>,
39-
T extends AbstractQueryExpressionDSL<W, T, R>,
40-
R
41-
>
42-
extends AbstractWhereSupportingDSL<W>
35+
import org.mybatis.dynamic.sql.where.AbstractWhereSupport;
36+
37+
public abstract class AbstractQueryExpressionDSL<W extends AbstractWhereDSL<?>,
38+
T extends AbstractQueryExpressionDSL<W, T, R>, R>
39+
extends AbstractWhereSupport<W>
4340
implements Buildable<R> {
4441

4542
private final List<JoinSpecification.Builder> joinSpecificationBuilders = new ArrayList<>();

src/main/java/org/mybatis/dynamic/sql/select/QueryExpressionDSL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.mybatis.dynamic.sql.select.join.JoinType;
3333
import org.mybatis.dynamic.sql.util.Buildable;
3434
import org.mybatis.dynamic.sql.where.AbstractWhereDSL;
35-
import org.mybatis.dynamic.sql.where.AbstractWhereSupportingDSL;
35+
import org.mybatis.dynamic.sql.where.AbstractWhereSupport;
3636
import org.mybatis.dynamic.sql.where.WhereModel;
3737

3838
public class QueryExpressionDSL<R>
@@ -306,7 +306,7 @@ public JoinSpecificationFinisher on(BasicColumn joinColumn, JoinCondition onJoin
306306
}
307307
}
308308

309-
public class JoinSpecificationFinisher extends AbstractWhereSupportingDSL<QueryExpressionWhereBuilder>
309+
public class JoinSpecificationFinisher extends AbstractWhereSupport<QueryExpressionWhereBuilder>
310310
implements Buildable<R> {
311311
private final JoinSpecification.Builder joinSpecificationBuilder;
312312

src/main/java/org/mybatis/dynamic/sql/update/UpdateDSL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
import org.mybatis.dynamic.sql.util.ValueMapping;
3737
import org.mybatis.dynamic.sql.util.ValueWhenPresentMapping;
3838
import org.mybatis.dynamic.sql.where.AbstractWhereDSL;
39-
import org.mybatis.dynamic.sql.where.AbstractWhereSupportingDSL;
39+
import org.mybatis.dynamic.sql.where.AbstractWhereSupport;
4040
import org.mybatis.dynamic.sql.where.WhereModel;
4141

42-
public class UpdateDSL<R> extends AbstractWhereSupportingDSL<UpdateDSL<R>.UpdateWhereBuilder> implements Buildable<R> {
42+
public class UpdateDSL<R> extends AbstractWhereSupport<UpdateDSL<R>.UpdateWhereBuilder> implements Buildable<R> {
4343

4444
private final Function<UpdateModel, R> adapterFunction;
4545
private final List<AbstractColumnMapping> columnMappings = new ArrayList<>();

src/main/java/org/mybatis/dynamic/sql/where/AbstractWhereSupportingDSL.java renamed to src/main/java/org/mybatis/dynamic/sql/where/AbstractWhereSupport.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
import org.mybatis.dynamic.sql.VisitableCondition;
2525

2626
/**
27-
* Base class for DSLs that support where clauses.
27+
* Base class for DSLs that support where clauses - which is every DSL except Insert.
28+
* The purpose of the class is to provide an implementation of the {@link AbstractWhereDSL}
29+
* that is customized for a particular DSL, and to add the initiating common "where"
30+
* methods.
2831
*
29-
* @param <W> the implementation of the Where DSL.
32+
* @param <W> the implementation of the Where DSL customized for a particular SQL statement.
3033
*/
31-
public abstract class AbstractWhereSupportingDSL<W extends AbstractWhereDSL<?>> {
34+
public abstract class AbstractWhereSupport<W extends AbstractWhereDSL<?>> {
3235

3336
public abstract W where();
3437

src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/KotlinBaseBuilders.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import org.mybatis.dynamic.sql.SqlTable
2121
import org.mybatis.dynamic.sql.VisitableCondition
2222
import org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL
2323
import org.mybatis.dynamic.sql.where.AbstractWhereDSL
24-
import org.mybatis.dynamic.sql.where.AbstractWhereSupportingDSL
24+
import org.mybatis.dynamic.sql.where.AbstractWhereSupport
2525

2626
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE)
2727
@DslMarker
@@ -31,7 +31,7 @@ typealias WhereApplier = AbstractWhereDSL<*>.() -> Unit
3131

3232
@MyBatisDslMarker
3333
@Suppress("TooManyFunctions")
34-
abstract class KotlinBaseBuilder<D: AbstractWhereSupportingDSL<*>, B: KotlinBaseBuilder<D, B>> {
34+
abstract class KotlinBaseBuilder<D: AbstractWhereSupport<*>, B: KotlinBaseBuilder<D, B>> {
3535
fun <T> where(column: BindableColumn<T>, condition: VisitableCondition<T>) =
3636
applyToWhere {
3737
where(column, condition)

0 commit comments

Comments
 (0)