Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/mybatis/dynamic/sql/SqlBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ static FromGatherer<SelectModel> select(BasicColumn... selectList) {
return SelectDSL.select(selectList);
}

static FromGatherer<SelectModel> select(Collection<BasicColumn> selectList) {
static FromGatherer<SelectModel> select(Collection<? extends BasicColumn> selectList) {
return SelectDSL.select(selectList);
}

static FromGatherer<SelectModel> selectDistinct(BasicColumn... selectList) {
return SelectDSL.selectDistinct(selectList);
}

static FromGatherer<SelectModel> selectDistinct(Collection<BasicColumn> selectList) {
static FromGatherer<SelectModel> selectDistinct(Collection<? extends BasicColumn> selectList) {
return SelectDSL.selectDistinct(selectList);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class OrderByModel {
private final List<SortSpecification> columns = new ArrayList<>();

private OrderByModel(Collection<SortSpecification> columns) {
private OrderByModel(Collection<? extends SortSpecification> columns) {
Objects.requireNonNull(columns);
if (columns.isEmpty()) {
throw new InvalidSqlException(Messages.getString("ERROR.12")); //$NON-NLS-1$
Expand All @@ -41,7 +41,7 @@ public <R> Stream<R> mapColumns(Function<SortSpecification, R> mapper) {
return columns.stream().map(mapper);
}

public static OrderByModel of(Collection<SortSpecification> columns) {
public static OrderByModel of(Collection<? extends SortSpecification> columns) {
return new OrderByModel(columns);
}
}
4 changes: 2 additions & 2 deletions src/main/java/org/mybatis/dynamic/sql/delete/DeleteDSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public DeleteDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public DeleteDSL<R> orderBy(Collection<SortSpecification> columns) {
public DeleteDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
return this;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public DeleteDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public DeleteDSL<R> orderBy(Collection<SortSpecification> columns) {
public DeleteDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
return DeleteDSL.this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public B withTable(SqlTable table) {
return getThis();
}

public B withColumnMappings(Collection<AbstractColumnMapping> columnMappings) {
public B withColumnMappings(Collection<? extends AbstractColumnMapping> columnMappings) {
this.columnMappings.addAll(columnMappings);
return getThis();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Builder withTable(SqlTable table) {
return this;
}

public Builder withColumnMappings(Collection<AbstractColumnMapping> columnMappings) {
public Builder withColumnMappings(Collection<? extends AbstractColumnMapping> columnMappings) {
this.columnMappings.addAll(columnMappings);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public Builder withTable(SqlTable table) {
return this;
}

public Builder withInsertMappings(List<AbstractColumnMapping> insertMappings) {
public Builder withInsertMappings(List<? extends AbstractColumnMapping> insertMappings) {
this.insertMappings.addAll(insertMappings);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Builder<T> withTable(SqlTable table) {
return this;
}

public Builder<T> withColumnMappings(Collection<AbstractColumnMapping> columnMappings) {
public Builder<T> withColumnMappings(Collection<? extends AbstractColumnMapping> columnMappings) {
this.columnMappings.addAll(columnMappings);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Builder<T> withRow(T row) {
return this;
}

public Builder<T> withColumnMappings(List<AbstractColumnMapping> columnMappings) {
public Builder<T> withColumnMappings(List<? extends AbstractColumnMapping> columnMappings) {
this.columnMappings.addAll(columnMappings);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class GroupByModel {
private final List<BasicColumn> columns = new ArrayList<>();

private GroupByModel(Collection<BasicColumn> columns) {
private GroupByModel(Collection<? extends BasicColumn> columns) {
Objects.requireNonNull(columns);
if (columns.isEmpty()) {
throw new InvalidSqlException(Messages.getString("ERROR.11")); //$NON-NLS-1$
Expand All @@ -41,7 +41,7 @@ public <R> Stream<R> mapColumns(Function<BasicColumn, R> mapper) {
return columns.stream().map(mapper);
}

public static GroupByModel of(Collection<BasicColumn> columns) {
public static GroupByModel of(Collection<? extends BasicColumn> columns) {
return new GroupByModel(columns);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public MultiSelectDSL orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public MultiSelectDSL orderBy(Collection<SortSpecification> columns) {
public MultiSelectDSL orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public GroupByFinisher groupBy(BasicColumn... columns) {
return groupBy(Arrays.asList(columns));
}

public GroupByFinisher groupBy(Collection<BasicColumn> columns) {
public GroupByFinisher groupBy(Collection<? extends BasicColumn> columns) {
groupByModel = GroupByModel.of(columns);
return new GroupByFinisher();
}
Expand All @@ -171,7 +171,7 @@ public SelectDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public SelectDSL<R> orderBy(Collection<SortSpecification> columns) {
public SelectDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
selectDSL.orderBy(columns);
return selectDSL;
}
Expand Down Expand Up @@ -261,7 +261,7 @@ public Builder<R> withConnector(String connector) {
return this;
}

public Builder<R> withSelectList(Collection<BasicColumn> selectList) {
public Builder<R> withSelectList(Collection<? extends BasicColumn> selectList) {
this.selectList.addAll(selectList);
return this;
}
Expand Down Expand Up @@ -300,15 +300,15 @@ public SelectDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public SelectDSL<R> orderBy(Collection<SortSpecification> columns) {
public SelectDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
return QueryExpressionDSL.this.orderBy(columns);
}

public GroupByFinisher groupBy(BasicColumn... columns) {
return groupBy(Arrays.asList(columns));
}

public GroupByFinisher groupBy(Collection<BasicColumn> columns) {
public GroupByFinisher groupBy(Collection<? extends BasicColumn> columns) {
return QueryExpressionDSL.this.groupBy(columns);
}

Expand Down Expand Up @@ -474,7 +474,7 @@ public GroupByFinisher groupBy(BasicColumn... columns) {
return groupBy(Arrays.asList(columns));
}

public GroupByFinisher groupBy(Collection<BasicColumn> columns) {
public GroupByFinisher groupBy(Collection<? extends BasicColumn> columns) {
return QueryExpressionDSL.this.groupBy(columns);
}

Expand All @@ -490,7 +490,7 @@ public SelectDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public SelectDSL<R> orderBy(Collection<SortSpecification> columns) {
public SelectDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
return QueryExpressionDSL.this.orderBy(columns);
}

Expand All @@ -512,7 +512,7 @@ public SelectDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public SelectDSL<R> orderBy(Collection<SortSpecification> columns) {
public SelectDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
return QueryExpressionDSL.this.orderBy(columns);
}

Expand Down Expand Up @@ -600,7 +600,7 @@ public SelectDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public SelectDSL<R> orderBy(Collection<SortSpecification> columns) {
public SelectDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
return QueryExpressionDSL.this.orderBy(columns);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Optional<HavingModel> havingModel() {
return Optional.ofNullable(havingModel);
}

public static Builder withSelectList(List<BasicColumn> columnList) {
public static Builder withSelectList(List<? extends BasicColumn> columnList) {
return new Builder().withSelectList(columnList);
}

Expand Down Expand Up @@ -130,7 +130,7 @@ public Builder withSelectColumn(BasicColumn selectColumn) {
return this;
}

public Builder withSelectList(List<BasicColumn> selectList) {
public Builder withSelectList(List<? extends BasicColumn> selectList) {
this.selectList.addAll(selectList);
return this;
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/mybatis/dynamic/sql/select/SelectDSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static QueryExpressionDSL.FromGatherer<SelectModel> select(BasicColumn...
return select(Arrays.asList(selectList));
}

public static QueryExpressionDSL.FromGatherer<SelectModel> select(Collection<BasicColumn> selectList) {
public static QueryExpressionDSL.FromGatherer<SelectModel> select(Collection<? extends BasicColumn> selectList) {
return select(Function.identity(), selectList);
}

Expand All @@ -68,7 +68,7 @@ public static <R> QueryExpressionDSL.FromGatherer<R> select(Function<SelectModel
}

public static <R> QueryExpressionDSL.FromGatherer<R> select(Function<SelectModel, R> adapterFunction,
Collection<BasicColumn> selectList) {
Collection<? extends BasicColumn> selectList) {
return new FromGatherer.Builder<R>()
.withSelectList(selectList)
.withSelectDSL(new SelectDSL<>(adapterFunction))
Expand All @@ -79,7 +79,7 @@ public static QueryExpressionDSL.FromGatherer<SelectModel> selectDistinct(BasicC
return selectDistinct(Function.identity(), selectList);
}

public static QueryExpressionDSL.FromGatherer<SelectModel> selectDistinct(Collection<BasicColumn> selectList) {
public static QueryExpressionDSL.FromGatherer<SelectModel> selectDistinct(Collection<? extends BasicColumn> selectList) {
return selectDistinct(Function.identity(), selectList);
}

Expand All @@ -89,7 +89,7 @@ public static <R> QueryExpressionDSL.FromGatherer<R> selectDistinct(Function<Sel
}

public static <R> QueryExpressionDSL.FromGatherer<R> selectDistinct(Function<SelectModel, R> adapterFunction,
Collection<BasicColumn> selectList) {
Collection<? extends BasicColumn> selectList) {
return new FromGatherer.Builder<R>()
.withSelectList(selectList)
.withSelectDSL(new SelectDSL<>(adapterFunction))
Expand All @@ -101,7 +101,7 @@ void registerQueryExpression(QueryExpressionDSL<R> queryExpression) {
queryExpressions.add(queryExpression);
}

void orderBy(Collection<SortSpecification> columns) {
void orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/mybatis/dynamic/sql/update/UpdateDSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public UpdateDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public UpdateDSL<R> orderBy(Collection<SortSpecification> columns) {
public UpdateDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
return this;
}
Expand Down Expand Up @@ -206,7 +206,7 @@ public UpdateDSL<R> orderBy(SortSpecification... columns) {
return orderBy(Arrays.asList(columns));
}

public UpdateDSL<R> orderBy(Collection<SortSpecification> columns) {
public UpdateDSL<R> orderBy(Collection<? extends SortSpecification> columns) {
orderByModel = OrderByModel.of(columns);
return UpdateDSL.this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static Builder withTable(SqlTable table) {
public static class Builder extends CommonBuilder<Builder> {
private final List<AbstractColumnMapping> columnMappings = new ArrayList<>();

public Builder withColumnMappings(List<AbstractColumnMapping> columnMappings) {
public Builder withColumnMappings(List<? extends AbstractColumnMapping> columnMappings) {
this.columnMappings.addAll(columnMappings);
return this;
}
Expand Down