Skip to content

Commit dc34fcd

Browse files
committed
Remove unnecessary adapters, simply mappers
1 parent 88eaaff commit dc34fcd

12 files changed

+123
-371
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,16 @@
2121
import org.mybatis.dynamic.sql.SqlCriterion;
2222
import org.mybatis.dynamic.sql.VisitableCondition;
2323
import org.mybatis.dynamic.sql.util.Buildable;
24-
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3SelectListHelper;
25-
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3SelectOneHelper;
24+
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3SelectHelper;
2625

2726
/**
2827
* This interface describes operations allowed for a select statement after the from and join clauses. This is
29-
* primarily to support the {@link MyBatis3SelectListHelper} and {@link MyBatis3SelectOneHelper} classes.
28+
* primarily to support the {@link MyBatis3SelectHelper} class.
3029
*
3130
* @author Jeff Butler
3231
*
3332
* @param <R> the model type created by these operations
3433
*
35-
* @see MyBatis3SelectListHelper
36-
* @see MyBatis3SelectOneHelper
37-
*
3834
*/
3935
public interface CompletableQuery<R> extends Buildable<R> {
4036
QueryExpressionDSL<R>.QueryExpressionWhereBuilder where();

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3DeleteHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.function.Function;
1919

2020
import org.mybatis.dynamic.sql.delete.DeleteDSL;
21+
import org.mybatis.dynamic.sql.delete.DeleteModel;
2122
import org.mybatis.dynamic.sql.util.Buildable;
2223

2324
/**
@@ -61,7 +62,7 @@
6162
*/
6263
@FunctionalInterface
6364
public interface MyBatis3DeleteHelper extends
64-
Function<DeleteDSL<MyBatis3DeleteModelToIntAdapter>, Buildable<MyBatis3DeleteModelToIntAdapter>> {
65+
Function<DeleteDSL<DeleteModel>, Buildable<DeleteModel>> {
6566

6667
/**
6768
* Returns a helper that can be used to delete every row in a table.

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3DeleteModelToIntAdapter.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3CountHelper.java renamed to src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3SelectHelper.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
import java.util.function.Function;
1919

20-
import org.mybatis.dynamic.sql.select.MyBatis3SelectModelAdapter;
21-
import org.mybatis.dynamic.sql.select.QueryExpressionDSL;
20+
import org.mybatis.dynamic.sql.SortSpecification;
21+
import org.mybatis.dynamic.sql.select.CompletableQuery;
22+
import org.mybatis.dynamic.sql.select.SelectModel;
2223
import org.mybatis.dynamic.sql.util.Buildable;
2324

2425
/**
@@ -62,15 +63,19 @@
6263
* @author Jeff Butler
6364
*/
6465
@FunctionalInterface
65-
public interface MyBatis3CountHelper extends
66-
Function<QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>>, Buildable<MyBatis3SelectModelAdapter<Long>>> {
66+
public interface MyBatis3SelectHelper extends
67+
Function<CompletableQuery<SelectModel>, Buildable<SelectModel>> {
6768

6869
/**
6970
* Returns a helper that can be used to count every row in a table.
7071
*
7172
* @return the helper that will count every row in a table
7273
*/
73-
static MyBatis3CountHelper allRows() {
74+
static MyBatis3SelectHelper allRows() {
7475
return h -> h;
7576
}
77+
78+
static MyBatis3SelectHelper allRowsOrderedBy(SortSpecification...columns) {
79+
return h -> h.orderBy(columns);
80+
}
7681
}

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3SelectListHelper.java

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3SelectOneHelper.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3UpdateHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.function.Function;
1919

2020
import org.mybatis.dynamic.sql.update.UpdateDSL;
21+
import org.mybatis.dynamic.sql.update.UpdateModel;
2122
import org.mybatis.dynamic.sql.util.Buildable;
2223

2324
/**
@@ -85,5 +86,5 @@
8586
*/
8687
@FunctionalInterface
8788
public interface MyBatis3UpdateHelper extends
88-
Function<UpdateDSL<MyBatis3UpdateModelToIntAdapter>, Buildable<MyBatis3UpdateModelToIntAdapter>> {
89+
Function<UpdateDSL<UpdateModel>, Buildable<UpdateModel>> {
8990
}

src/main/java/org/mybatis/dynamic/sql/util/mybatis3/MyBatis3UpdateModelToIntAdapter.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)