diff --git a/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java b/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java index 4932d4e..b5017e4 100644 --- a/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java +++ b/plusone-basic/plusone-basic-infrastructure/src/main/java/xyz/zhouxy/plusone/jdbc/PlusoneJdbcDaoSupport.java @@ -103,49 +103,49 @@ public abstract class PlusoneJdbcDaoSupport { return Numbers.sum(i); } - protected static final void assertResultEquals(T result, T expectedValue) { + protected static void assertResultEquals(T result, T expectedValue) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(); } } - protected static final void assertResultEquals(T result, T expectedValue, Function errMsg) { + protected static void assertResultEquals(T result, T expectedValue, Function errMsg) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(errMsg.apply(result)); } } - protected static final void assertResultEquals(T result, T expectedValue, String msgTemplate, Object... args) { + protected static void assertResultEquals(T result, T expectedValue, String msgTemplate, Object... args) { if (!Objects.equals(result, expectedValue)) { throw new DataOperationResultException(String.format(msgTemplate, args)); } } - protected static final void assertResultEqualsOrThrow(T result, T expectedValue, + protected static void assertResultEqualsOrThrow(T result, T expectedValue, Function e) throws E { if (!Objects.equals(result, expectedValue)) { throw e.apply(result); } } - protected static final void assertUpdateOneRow(int result) { + protected static void assertUpdateOneRow(int result) { assertResultEquals(result, 1); } - protected static final void assertUpdateOneRow(int result, Function errMsg) { + protected static void assertUpdateOneRow(int result, Function errMsg) { assertResultEquals(result, 1, errMsg); } - protected static final void assertUpdateOneRow(int result, String msgTemplate, Object... args) { + protected static void assertUpdateOneRow(int result, String msgTemplate, Object... args) { assertResultEquals(result, 1, msgTemplate, args); } - protected static final void assertUpdateOneRowOrThrow(int result, Function e) + protected static void assertUpdateOneRowOrThrow(int result, Function e) throws E { assertResultEqualsOrThrow(result, 1, e); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( T[] c, @Nonnull Function paramSourceBuilder) { if (c == null || c.length == 0) { @@ -154,7 +154,7 @@ public abstract class PlusoneJdbcDaoSupport { return buildSqlParameterSourceArray(Arrays.stream(c), paramSourceBuilder); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( Collection c, @Nonnull Function paramSourceBuilder) { if (CollectionUtils.isEmpty(c)) { @@ -163,7 +163,7 @@ public abstract class PlusoneJdbcDaoSupport { return buildSqlParameterSourceArray(c.stream(), paramSourceBuilder); } - protected static final SqlParameterSource[] buildSqlParameterSourceArray( + protected static SqlParameterSource[] buildSqlParameterSourceArray( Stream stream, @Nonnull Function paramSourceBuilder) { Objects.requireNonNull(stream);