Fix NullListQueryMapper.java for java6
This commit is contained in:
parent
7c053176d2
commit
8698c2740d
|
@ -5,15 +5,13 @@ import com.moparisthebest.jdbc.util.ResultSetIterable;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
//IFJAVA8_START
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
//IFJAVA8_END
|
||||||
|
|
||||||
import static com.moparisthebest.jdbc.NullQueryMapper.safeHandler;
|
import static com.moparisthebest.jdbc.NullQueryMapper.safeHandler;
|
||||||
|
|
||||||
//IFJAVA8_START
|
|
||||||
//IFJAVA8_END
|
|
||||||
|
|
||||||
public class NullListQueryMapper extends ListQueryMapper {
|
public class NullListQueryMapper extends ListQueryMapper {
|
||||||
|
|
||||||
protected final NullQueryMapper.ThrowableHandler handler;
|
protected final NullQueryMapper.ThrowableHandler handler;
|
||||||
|
@ -90,7 +88,7 @@ public class NullListQueryMapper extends ListQueryMapper {
|
||||||
public <T> InList.InListObject inList(String columnName, Collection<T> values) {
|
public <T> InList.InListObject inList(String columnName, Collection<T> values) {
|
||||||
try {
|
try {
|
||||||
return delegate.inList(columnName, values);
|
return delegate.inList(columnName, values);
|
||||||
} catch (SQLException e) {
|
} catch (Throwable e) {
|
||||||
handler.handle(e);
|
handler.handle(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,7 +98,7 @@ public class NullListQueryMapper extends ListQueryMapper {
|
||||||
public <T> InList.InListObject notInList(String columnName, Collection<T> values) {
|
public <T> InList.InListObject notInList(String columnName, Collection<T> values) {
|
||||||
try {
|
try {
|
||||||
return delegate.notInList(columnName, values);
|
return delegate.notInList(columnName, values);
|
||||||
} catch (SQLException e) {
|
} catch (Throwable e) {
|
||||||
handler.handle(e);
|
handler.handle(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.moparisthebest.jdbc.util.ResultSetIterable;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
//IFJAVA8_START
|
//IFJAVA8_START
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
Loading…
Reference in New Issue