Remove now useless extra toType tests now that we test everything with toType

This commit is contained in:
Travis Burtrum 2018-05-10 23:41:17 -04:00
parent a0dfc278c3
commit 2650b60f47
4 changed files with 0 additions and 50 deletions

View File

@ -176,15 +176,9 @@ public interface QmDao extends JdbcMapper {
@SQL(bobTomMap) @SQL(bobTomMap)
List<CaseInsensitiveHashMap<String, String>> getBobTomMapCaseInsensitive() throws SQLException; List<CaseInsensitiveHashMap<String, String>> getBobTomMapCaseInsensitive() throws SQLException;
@SQL(bobTomMap)
List<CaseInsensitiveHashMap<String, String>> getBobTomMapCaseInsensitiveType() throws SQLException;
@SQL(selectThreePeople) @SQL(selectThreePeople)
List<FieldPerson> getThreePeople(long personNo1, long personNo2, long personNo3) throws SQLException; List<FieldPerson> getThreePeople(long personNo1, long personNo2, long personNo3) throws SQLException;
@SQL(selectThreePeople)
List<FieldPerson> getThreePeopleType(long personNo1, long personNo2, long personNo3) throws SQLException;
@SQL(selectThreePeople) @SQL(selectThreePeople)
ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(long personNo1, long personNo2, long personNo3) throws SQLException; ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(long personNo1, long personNo2, long personNo3) throws SQLException;

View File

@ -2,7 +2,6 @@ package com.moparisthebest.jdbc.codegen;
import com.moparisthebest.jdbc.QueryMapper; import com.moparisthebest.jdbc.QueryMapper;
import com.moparisthebest.jdbc.ResultSetMapper; import com.moparisthebest.jdbc.ResultSetMapper;
import com.moparisthebest.jdbc.TypeReference;
import com.moparisthebest.jdbc.dto.*; import com.moparisthebest.jdbc.dto.*;
import com.moparisthebest.jdbc.util.CaseInsensitiveHashMap; import com.moparisthebest.jdbc.util.CaseInsensitiveHashMap;
import com.moparisthebest.jdbc.util.ResultSetIterable; import com.moparisthebest.jdbc.util.ResultSetIterable;
@ -262,23 +261,12 @@ public class QueryMapperQmDao implements QmDao {
return (List<CaseInsensitiveHashMap<String, String>>)(Object)qm.toListMap(bobTomMap, CaseInsensitiveHashMap.class, String.class); return (List<CaseInsensitiveHashMap<String, String>>)(Object)qm.toListMap(bobTomMap, CaseInsensitiveHashMap.class, String.class);
} }
@Override
public List<CaseInsensitiveHashMap<String, String>> getBobTomMapCaseInsensitiveType() throws SQLException {
return qm.toType(bobTomMap, new TypeReference<List<CaseInsensitiveHashMap<String, String>>>() {});
}
@Override @Override
public List<FieldPerson> getThreePeople(final long personNo1, final long personNo2, final long personNo3) throws SQLException { public List<FieldPerson> getThreePeople(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toList(selectThreePeople, return qm.toList(selectThreePeople,
FieldPerson.class, personNo1, personNo2, personNo3); FieldPerson.class, personNo1, personNo2, personNo3);
} }
@Override
public List<FieldPerson> getThreePeopleType(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toType(selectThreePeople,
new TypeReference<List<FieldPerson>>() {}, personNo1, personNo2, personNo3);
}
@Override @Override
public ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(final long personNo1, final long personNo2, final long personNo3) throws SQLException { public ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toResultSetIterable(selectThreePeople, return qm.toResultSetIterable(selectThreePeople,

View File

@ -215,23 +215,12 @@ public class QueryMapperTypeQmDao extends QueryMapperQmDao {
return qm.toType(bobTomMap, new TypeReference<List<CaseInsensitiveHashMap<String, String>>>() {}); return qm.toType(bobTomMap, new TypeReference<List<CaseInsensitiveHashMap<String, String>>>() {});
} }
@Override
public List<CaseInsensitiveHashMap<String, String>> getBobTomMapCaseInsensitiveType() throws SQLException {
return qm.toType(bobTomMap, new TypeReference<List<CaseInsensitiveHashMap<String, String>>>() {});
}
@Override @Override
public List<FieldPerson> getThreePeople(final long personNo1, final long personNo2, final long personNo3) throws SQLException { public List<FieldPerson> getThreePeople(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toType(selectThreePeople, return qm.toType(selectThreePeople,
new TypeReference<List<FieldPerson>>() {}, personNo1, personNo2, personNo3); new TypeReference<List<FieldPerson>>() {}, personNo1, personNo2, personNo3);
} }
@Override
public List<FieldPerson> getThreePeopleType(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toType(selectThreePeople,
new TypeReference<List<FieldPerson>>() {}, personNo1, personNo2, personNo3);
}
@Override @Override
public ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(final long personNo1, final long personNo2, final long personNo3) throws SQLException { public ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
return qm.toType(selectThreePeople, return qm.toType(selectThreePeople,

View File

@ -455,33 +455,12 @@ public class QueryMapperTest {
assertEquals("tom", map.get("TOM")); assertEquals("tom", map.get("TOM"));
} }
@Test
public void testCaseInsensitiveMapJdbcMapperType() throws Throwable {
final Map<String, String> map = qm.getBobTomMapCaseInsensitiveType().get(0);
assertEquals("bob", map.get("bob"));
assertEquals("bob", map.get("Bob"));
assertEquals("bob", map.get("BoB"));
assertEquals("bob", map.get("BOb"));
assertEquals("bob", map.get("BOB"));
assertEquals("tom", map.get("tom"));
assertEquals("tom", map.get("Tom"));
assertEquals("tom", map.get("ToM"));
assertEquals("tom", map.get("TOm"));
assertEquals("tom", map.get("TOM"));
}
@Test @Test
public void testList() throws SQLException { public void testList() throws SQLException {
final List<FieldPerson> fromDb = qm.getThreePeople(people[0].getPersonNo(), people[1].getPersonNo(), people[2].getPersonNo()); final List<FieldPerson> fromDb = qm.getThreePeople(people[0].getPersonNo(), people[1].getPersonNo(), people[2].getPersonNo());
assertArrayEquals(people, fromDb.toArray()); assertArrayEquals(people, fromDb.toArray());
} }
@Test
public void testListType() throws SQLException {
final List<FieldPerson> fromDb = qm.getThreePeopleType(people[0].getPersonNo(), people[1].getPersonNo(), people[2].getPersonNo());
assertArrayEquals(people, fromDb.toArray());
}
@Test @Test
public void testListQueryMapperList() throws SQLException { public void testListQueryMapperList() throws SQLException {
if(!(qm instanceof QueryMapperQmDao)) if(!(qm instanceof QueryMapperQmDao))