converted to Validate object
This commit is contained in:
parent
ca20240d30
commit
1e69054eb7
14 changed files with 55 additions and 69 deletions
|
|
@ -26,7 +26,8 @@ import java.sql.Connection;
|
|||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import net.forwardfire.tpquery.TPQFactory;
|
||||
import net.forwardfire.tpquery.store.executor.AbstractTPQExecutor;
|
||||
|
|
@ -77,7 +78,7 @@ public class TPQExecutorJdbc extends AbstractTPQExecutor<Connection,PreparedStat
|
|||
}
|
||||
|
||||
protected PreparedStatement execute(PreparedStatement statement) {
|
||||
Objects.requireNonNull(statement,"Can't execute with null statement.");
|
||||
Validate.notNull(statement,"Can't execute with null statement.");
|
||||
try {
|
||||
statement.execute();
|
||||
return statement;
|
||||
|
|
@ -88,7 +89,7 @@ public class TPQExecutorJdbc extends AbstractTPQExecutor<Connection,PreparedStat
|
|||
|
||||
@Override
|
||||
protected int executeUpdate(PreparedStatement statement) {
|
||||
Objects.requireNonNull(statement,"Can't execute update with null statement.");
|
||||
Validate.notNull(statement,"Can't execute update with null statement.");
|
||||
try {
|
||||
int result = statement.executeUpdate();
|
||||
statement.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue