mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -554,7 +554,7 @@ public abstract class AbstractDb<R extends AbstractDb<R>> extends DefaultConnect
|
||||
* @throws DbRuntimeException SQL执行异常
|
||||
*/
|
||||
public <T> T find(final Entity where, final RsHandler<T> rsh, final String... fields) throws DbRuntimeException {
|
||||
return find(ListUtil.toList(fields), where, rsh);
|
||||
return find(ListUtil.of(fields), where, rsh);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -156,7 +156,7 @@ public class Entity extends Dict {
|
||||
*/
|
||||
public Entity setFieldNames(final Collection<String> fieldNames) {
|
||||
if (CollUtil.isNotEmpty(fieldNames)) {
|
||||
this.fieldNames = SetUtil.newHashSet(true, fieldNames);
|
||||
this.fieldNames = SetUtil.of(true, fieldNames);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class Entity extends Dict {
|
||||
*/
|
||||
public Entity setFieldNames(final String... fieldNames) {
|
||||
if (ArrayUtil.isNotEmpty(fieldNames)) {
|
||||
this.fieldNames = SetUtil.newLinkedHashSet(fieldNames);
|
||||
this.fieldNames = SetUtil.ofLinked(fieldNames);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@@ -134,7 +134,7 @@ public interface Dialect extends Serializable {
|
||||
* @throws SQLException SQL执行异常
|
||||
*/
|
||||
default PreparedStatement psForCount(final Connection conn, final Query query) throws SQLException {
|
||||
return psForFind(conn, query.clone().setFields(ListUtil.toList("count(1)")));
|
||||
return psForFind(conn, query.clone().setFields(ListUtil.of("count(1)")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -272,7 +272,7 @@ public class MetaUtil {
|
||||
indexInfo.getColumnIndexInfoList().add(ColumnIndexInfo.create(rs));
|
||||
}
|
||||
}
|
||||
table.setIndexInfoList(ListUtil.toList(indexInfoMap.values()));
|
||||
table.setIndexInfoList(ListUtil.of(indexInfoMap.values()));
|
||||
}
|
||||
} catch (final SQLException e) {
|
||||
throw new DbRuntimeException("Get columns error!", e);
|
||||
|
@@ -55,7 +55,7 @@ public class ConditionBuilder implements Builder<String> {
|
||||
* @return 参数列表
|
||||
*/
|
||||
public List<Object> getParamValues() {
|
||||
return ListUtil.unmodifiable(this.paramValues);
|
||||
return ListUtil.view(this.paramValues);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -113,7 +113,7 @@ public class Query implements Cloneable {
|
||||
* @return this
|
||||
*/
|
||||
public Query setFields(final String... fields) {
|
||||
this.fields = ListUtil.toList(fields);
|
||||
this.fields = ListUtil.of(fields);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user