Skip to content

Commit e01716f

Browse files
committed
Improve WhereApplier
Limit the composition function to more clearly express the intent and capabilities of composition
1 parent 956411e commit e01716f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/org/mybatis/dynamic/sql/where/WhereApplier.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@
1515
*/
1616
package org.mybatis.dynamic.sql.where;
1717

18+
import org.mybatis.dynamic.sql.common.AbstractBooleanExpressionDSL;
19+
1820
import java.util.function.Consumer;
1921

2022
@FunctionalInterface
21-
public interface WhereApplier extends Consumer<AbstractWhereDSL<?>> {
23+
public interface WhereApplier {
24+
25+
void accept(AbstractWhereDSL<?> abstractWhereDSL);
26+
2227
/**
2328
* Return a composed where applier that performs this operation followed by the after operation.
2429
*
@@ -27,7 +32,7 @@ public interface WhereApplier extends Consumer<AbstractWhereDSL<?>> {
2732
*
2833
* @return a composed where applier that performs this operation followed by the after operation.
2934
*/
30-
default WhereApplier andThen(WhereApplier after) {
35+
default WhereApplier andThen(Consumer<AbstractBooleanExpressionDSL<?>> after) {
3136
return t -> {
3237
accept(t);
3338
after.accept(t);

0 commit comments

Comments
 (0)