Remove toMap that takes a Map class, because it cannot be called without an unchecked warning, send in object
This commit is contained in:
parent
fcc0fda3dc
commit
b0a5905c41
@ -157,11 +157,6 @@ public class CachingQueryMapper extends QueryMapper {
|
|||||||
return super.toCollection(getPreparedStatement(sql), list, componentType, bindObjects);
|
return super.toCollection(getPreparedStatement(sql), list, componentType, bindObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(String sql, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
|
||||||
return super.toMap(getPreparedStatement(sql), returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Map<K, E>, K, E> T toMap(String sql, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
public <T extends Map<K, E>, K, E> T toMap(String sql, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
||||||
return super.toMap(getPreparedStatement(sql), map, mapKeyType, componentType, bindObjects);
|
return super.toMap(getPreparedStatement(sql), map, mapKeyType, componentType, bindObjects);
|
||||||
|
@ -280,16 +280,6 @@ public class ListQueryMapper extends QueryMapper {
|
|||||||
return delegate.toCollection(prepareSql(sql, bindObjects), list, componentType, bindObjects);
|
return delegate.toCollection(prepareSql(sql, bindObjects), list, componentType, bindObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
|
||||||
return delegate.toMap(ps, returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(String sql, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
|
||||||
return delegate.toMap(prepareSql(sql, bindObjects), returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
||||||
return delegate.toMap(ps, map, mapKeyType, componentType, bindObjects);
|
return delegate.toMap(ps, map, mapKeyType, componentType, bindObjects);
|
||||||
|
@ -337,26 +337,6 @@ public class NullQueryMapper extends QueryMapper {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement query, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) {
|
|
||||||
try {
|
|
||||||
return delegate.toMap(query, returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
} catch (Throwable e) {
|
|
||||||
if (verbose) e.printStackTrace();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(String query, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) {
|
|
||||||
try {
|
|
||||||
return delegate.toMap(query, returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
} catch (Throwable e) {
|
|
||||||
if (verbose) e.printStackTrace();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement query, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) {
|
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement query, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) {
|
||||||
try {
|
try {
|
||||||
|
@ -420,20 +420,6 @@ public class QueryMapper implements Closeable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
|
||||||
return cm.toMap(bindExecute(ps, bindObjects), returnType, mapKeyType, componentType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(String sql, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
|
||||||
PreparedStatement ps = null;
|
|
||||||
try {
|
|
||||||
ps = conn.prepareStatement(sql);
|
|
||||||
return this.toMap(ps, returnType, mapKeyType, componentType, bindObjects);
|
|
||||||
} finally {
|
|
||||||
tryClose(ps);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement ps, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) throws SQLException {
|
||||||
return cm.toMap(bindExecute(ps, bindObjects), map, mapKeyType, componentType);
|
return cm.toMap(bindExecute(ps, bindObjects), map, mapKeyType, componentType);
|
||||||
}
|
}
|
||||||
|
@ -447,10 +447,6 @@ public class ResultSetMapper {
|
|||||||
return privToCollection(rs, list, componentType, arrayMaxLength, cal, null);
|
return privToCollection(rs, list, componentType, arrayMaxLength, cal, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, int arrayMaxLength, Calendar cal) {
|
|
||||||
return privToMap(rs, returnType, mapKeyType, componentType, arrayMaxLength, cal, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, T map, Class<K> mapKeyType, Class<E> componentType, int arrayMaxLength, Calendar cal) {
|
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, T map, Class<K> mapKeyType, Class<E> componentType, int arrayMaxLength, Calendar cal) {
|
||||||
return privToMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal, null);
|
return privToMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal, null);
|
||||||
}
|
}
|
||||||
@ -645,18 +641,6 @@ public class ResultSetMapper {
|
|||||||
return this.toCollection(rs, list, componentType, arrayMaxLength, cal);
|
return this.toCollection(rs, list, componentType, arrayMaxLength, cal);
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType) {
|
|
||||||
return this.toMap(rs, returnType, mapKeyType, componentType, arrayMaxLength, cal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, int arrayMaxLength) {
|
|
||||||
return this.toMap(rs, returnType, mapKeyType, componentType, arrayMaxLength, cal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, final Class<T> returnType, Class<K> mapKeyType, Class<E> componentType, Calendar cal) {
|
|
||||||
return this.toMap(rs, returnType, mapKeyType, componentType, arrayMaxLength, cal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, T map, Class<K> mapKeyType, Class<E> componentType) {
|
public <T extends Map<K, E>, K, E> T toMap(ResultSet rs, T map, Class<K> mapKeyType, Class<E> componentType) {
|
||||||
return this.toMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal);
|
return this.toMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user