if(e.getKind()==ElementKind.CONSTRUCTOR&&e.getModifiers().contains(Modifier.PUBLIC)){// todo: public normally, but also package-private if same package, or protected if it's a sub-class of super...
thrownewMapperException("Exception when trying to get constructor for : "+_returnTypeClass.toString()+" Must have default no-arg constructor or one that takes a single ResultSet.");
thrownewMapperException("Exception when trying to get constructor for : "+_returnTypeClass.toString()+" Must have default no-arg constructor, one that takes a single ResultSet, or one that takes parameters named like the query columns (in any order):\n"+
RowToObjectMapper.keysToString(keys)+"\nRequires compilation with -parameters argument if source isn't being compiled this pass, beware Bug ID: JDK-8191074 with jdk8, fixed in 9+");
@ -197,7 +197,11 @@ public class RowToObjectMapper<K, T> extends AbstractRowMapper<K, T> {
// if column count is 2 or less, it might map directly to a type like a Long or something, or be a map which does
// or if componentType is non-null, then we want an array like Long[] or String[]
if(_columnCount>2&&componentType==null)
thrownewMapperException("Exception when trying to get constructor for : "+_returnTypeClass.getName()+" Must have default no-arg constructor or one that takes a single ResultSet.",e1);
thrownewMapperException("Exception when trying to get constructor for : "+_returnTypeClass.getName()+" Must have default no-arg constructor or one that takes a single ResultSet"
//IFJAVA8_START
+", or one that takes parameters named like the query columns (in any order):\n"+keysToString(keys)+"\nRequires compilation with -parameters argument, beware Bug ID: JDK-8191074 with jdk8, fixed in 9+"
//IFJAVA8_END
,e1);
}
}
}
@ -208,6 +212,24 @@ public class RowToObjectMapper<K, T> extends AbstractRowMapper<K, T> {