File tree Expand file tree Collapse file tree 7 files changed +16
-16
lines changed
main/java/org/mybatis/dynamic/sql
test/java/org/mybatis/dynamic/sql/util Expand file tree Collapse file tree 7 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 2626import org .mybatis .dynamic .sql .util .StringConstantMapping ;
2727import org .mybatis .dynamic .sql .util .ValueMapping ;
2828
29- public class GeneralInsertValuePhraseVisitor implements GeneralInsertMappingVisitor <FieldAndValueAndParameters > {
29+ public class GeneralInsertValuePhraseVisitor extends GeneralInsertMappingVisitor <FieldAndValueAndParameters > {
3030
3131 protected RenderingStrategy renderingStrategy ;
3232 private AtomicInteger sequence = new AtomicInteger (1 );
Original file line number Diff line number Diff line change 2525import org .mybatis .dynamic .sql .util .PropertyMapping ;
2626import org .mybatis .dynamic .sql .util .StringConstantMapping ;
2727
28- public class ValuePhraseVisitor implements InsertMappingVisitor <FieldAndValue > {
28+ public class ValuePhraseVisitor extends InsertMappingVisitor <FieldAndValue > {
2929
3030 protected RenderingStrategy renderingStrategy ;
3131
Original file line number Diff line number Diff line change 3333import org .mybatis .dynamic .sql .util .UpdateMappingVisitor ;
3434import org .mybatis .dynamic .sql .util .ValueMapping ;
3535
36- public class SetPhraseVisitor implements UpdateMappingVisitor <FragmentAndParameters > {
36+ public class SetPhraseVisitor extends UpdateMappingVisitor <FragmentAndParameters > {
3737
3838 private AtomicInteger sequence ;
3939 private RenderingStrategy renderingStrategy ;
Original file line number Diff line number Diff line change 1515 */
1616package org .mybatis .dynamic .sql .util ;
1717
18- public interface GeneralInsertMappingVisitor <T > extends ColumnMappingVisitor <T > {
18+ public abstract class GeneralInsertMappingVisitor <T > implements ColumnMappingVisitor <T > {
1919 @ Override
20- default T visit (SelectMapping mapping ) {
20+ public final T visit (SelectMapping mapping ) {
2121 throw new UnsupportedOperationException ();
2222 }
2323
2424 @ Override
25- default T visit (PropertyMapping mapping ) {
25+ public final T visit (PropertyMapping mapping ) {
2626 throw new UnsupportedOperationException ();
2727 }
2828
2929 @ Override
30- default T visit (ColumnToColumnMapping columnMapping ) {
30+ public final T visit (ColumnToColumnMapping columnMapping ) {
3131 throw new UnsupportedOperationException ();
3232 }
3333}
Original file line number Diff line number Diff line change 1515 */
1616package org .mybatis .dynamic .sql .util ;
1717
18- public interface InsertMappingVisitor <T > extends ColumnMappingVisitor <T > {
18+ public abstract class InsertMappingVisitor <T > implements ColumnMappingVisitor <T > {
1919 @ Override
20- default <R > T visit (ValueMapping <R > mapping ) {
20+ public final <R > T visit (ValueMapping <R > mapping ) {
2121 throw new UnsupportedOperationException ();
2222 }
2323
2424 @ Override
25- default T visit (SelectMapping mapping ) {
25+ public final T visit (SelectMapping mapping ) {
2626 throw new UnsupportedOperationException ();
2727 }
2828
2929 @ Override
30- default T visit (ColumnToColumnMapping columnMapping ) {
30+ public final T visit (ColumnToColumnMapping columnMapping ) {
3131 throw new UnsupportedOperationException ();
3232 }
3333}
Original file line number Diff line number Diff line change 1515 */
1616package org .mybatis .dynamic .sql .util ;
1717
18- public interface UpdateMappingVisitor <T > extends ColumnMappingVisitor <T > {
18+ public abstract class UpdateMappingVisitor <T > implements ColumnMappingVisitor <T > {
1919 @ Override
20- default T visit (PropertyMapping mapping ) {
20+ public final T visit (PropertyMapping mapping ) {
2121 throw new UnsupportedOperationException ();
2222 }
2323}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public TestTable() {
9999 }
100100 }
101101
102- private static class GeneralInsertVisitor implements GeneralInsertMappingVisitor <String > {
102+ private static class GeneralInsertVisitor extends GeneralInsertMappingVisitor <String > {
103103 @ Override
104104 public String visit (NullMapping mapping ) {
105105 return "Null Mapping" ;
@@ -121,7 +121,7 @@ public <R> String visit(ValueMapping<R> mapping) {
121121 }
122122 }
123123
124- private static class InsertVisitor implements InsertMappingVisitor <String > {
124+ private static class InsertVisitor extends InsertMappingVisitor <String > {
125125 @ Override
126126 public String visit (NullMapping mapping ) {
127127 return "Null Mapping" ;
@@ -143,7 +143,7 @@ public String visit(PropertyMapping mapping) {
143143 }
144144 }
145145
146- private static class UpdateVisitor implements UpdateMappingVisitor <String > {
146+ private static class UpdateVisitor extends UpdateMappingVisitor <String > {
147147 @ Override
148148 public String visit (NullMapping mapping ) {
149149 return "Null Mapping" ;
You can’t perform that action at this time.
0 commit comments