Skip to content

Commit f3e8a84

Browse files
authored
Merge pull request #235 from jeffgbutler/master
Final all the things
2 parents cacbf1b + a3afbf2 commit f3e8a84

File tree

98 files changed

+310
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+310
-308
lines changed

src/main/java/org/mybatis/dynamic/sql/AbstractColumnComparisonCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2018 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919

2020
public abstract class AbstractColumnComparisonCondition<T> implements VisitableCondition<T> {
2121

22-
protected BasicColumn column;
22+
protected final BasicColumn column;
2323

2424
protected AbstractColumnComparisonCondition(BasicColumn column) {
2525
this.column = column;

src/main/java/org/mybatis/dynamic/sql/AbstractListValueCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.util.stream.Stream;
2424

2525
public abstract class AbstractListValueCondition<T> implements VisitableCondition<T> {
26-
protected Collection<T> values;
27-
protected UnaryOperator<Stream<T>> valueStreamTransformer;
26+
protected final Collection<T> values;
27+
protected final UnaryOperator<Stream<T>> valueStreamTransformer;
2828
protected boolean renderWhenEmpty = false;
2929

3030
protected AbstractListValueCondition(Collection<T> values) {

src/main/java/org/mybatis/dynamic/sql/AbstractNoValueCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2018 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020

2121
public abstract class AbstractNoValueCondition<T> implements VisitableCondition<T> {
2222

23-
private BooleanSupplier booleanSupplier;
23+
private final BooleanSupplier booleanSupplier;
2424

2525
protected AbstractNoValueCondition() {
2626
booleanSupplier = () -> true;

src/main/java/org/mybatis/dynamic/sql/AbstractSingleValueCondition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2018 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
2020
import java.util.function.Supplier;
2121

2222
public abstract class AbstractSingleValueCondition<T> implements VisitableCondition<T> {
23-
protected Supplier<T> valueSupplier;
24-
private Predicate<T> predicate;
23+
protected final Supplier<T> valueSupplier;
24+
private final Predicate<T> predicate;
2525

2626
protected AbstractSingleValueCondition(Supplier<T> valueSupplier) {
2727
this.valueSupplier = Objects.requireNonNull(valueSupplier);

src/main/java/org/mybatis/dynamic/sql/AbstractSubselectCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919
import org.mybatis.dynamic.sql.util.Buildable;
2020

2121
public abstract class AbstractSubselectCondition<T> implements VisitableCondition<T> {
22-
private SelectModel selectModel;
22+
private final SelectModel selectModel;
2323

2424
protected AbstractSubselectCondition(Buildable<SelectModel> selectModelBuilder) {
2525
this.selectModel = selectModelBuilder.build();

src/main/java/org/mybatis/dynamic/sql/AbstractTwoValueCondition.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2018 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@
2020
import java.util.function.Supplier;
2121

2222
public abstract class AbstractTwoValueCondition<T> implements VisitableCondition<T> {
23-
protected Supplier<T> valueSupplier1;
24-
protected Supplier<T> valueSupplier2;
25-
private BiPredicate<T, T> predicate;
23+
protected final Supplier<T> valueSupplier1;
24+
protected final Supplier<T> valueSupplier2;
25+
private final BiPredicate<T, T> predicate;
2626

2727
protected AbstractTwoValueCondition(Supplier<T> valueSupplier1, Supplier<T> valueSupplier2) {
2828
this.valueSupplier1 = Objects.requireNonNull(valueSupplier1);
@@ -32,7 +32,8 @@ protected AbstractTwoValueCondition(Supplier<T> valueSupplier1, Supplier<T> valu
3232

3333
protected AbstractTwoValueCondition(Supplier<T> valueSupplier1, Supplier<T> valueSupplier2,
3434
BiPredicate<T, T> predicate) {
35-
this(valueSupplier1, valueSupplier2);
35+
this.valueSupplier1 = Objects.requireNonNull(valueSupplier1);
36+
this.valueSupplier2 = Objects.requireNonNull(valueSupplier2);
3637
this.predicate = Objects.requireNonNull(predicate);
3738
}
3839

src/main/java/org/mybatis/dynamic/sql/Constant.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public class Constant<T> implements BindableColumn<T> {
2424

2525
private String alias;
26-
private String value;
26+
private final String value;
2727

2828
private Constant(String value) {
2929
this.value = Objects.requireNonNull(value);

src/main/java/org/mybatis/dynamic/sql/SortSpecification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ public interface SortSpecification {
4040
/**
4141
* Return true if the sort order is descending.
4242
*
43-
* @return true if the SortSpcification should render as descending
43+
* @return true if the SortSpecification should render as descending
4444
*/
4545
boolean isDescending();
4646
}

src/main/java/org/mybatis/dynamic/sql/SqlBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static SortSpecification sortColumn(String name) {
734734

735735
class InsertIntoNextStep {
736736

737-
private SqlTable table;
737+
private final SqlTable table;
738738

739739
private InsertIntoNextStep(SqlTable table) {
740740
this.table = Objects.requireNonNull(table);

src/main/java/org/mybatis/dynamic/sql/SqlColumn.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
public class SqlColumn<T> implements BindableColumn<T>, SortSpecification {
2727

28-
protected String name;
29-
protected SqlTable table;
30-
protected JDBCType jdbcType;
28+
protected final String name;
29+
protected final SqlTable table;
30+
protected final JDBCType jdbcType;
3131
protected boolean isDescending = false;
3232
protected String alias;
3333
protected String typeHandler;

0 commit comments

Comments
 (0)