Remove toMap that takes a Map class, because it cannot be called without an unchecked warning, send in object

This commit is contained in:
Travis Burtrum 2017-04-20 14:15:59 -04:00
parent fcc0fda3dc
commit b0a5905c41
5 changed files with 0 additions and 65 deletions

View File

@ -157,11 +157,6 @@ public class CachingQueryMapper extends QueryMapper {
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
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);

View File

@ -280,16 +280,6 @@ public class ListQueryMapper extends QueryMapper {
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
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);

View File

@ -337,26 +337,6 @@ public class NullQueryMapper extends QueryMapper {
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
public <T extends Map<K, E>, K, E> T toMap(PreparedStatement query, T map, Class<K> mapKeyType, Class<E> componentType, final Object... bindObjects) {
try {

View File

@ -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 {
return cm.toMap(bindExecute(ps, bindObjects), map, mapKeyType, componentType);
}

View File

@ -447,10 +447,6 @@ public class ResultSetMapper {
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) {
return privToMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal, null);
}
@ -645,18 +641,6 @@ public class ResultSetMapper {
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) {
return this.toMap(rs, map, mapKeyType, componentType, arrayMaxLength, cal);
}