stephenh/joist — pull request #9 by mdietz198 (2013-02-26 16:57:38+00:00)
Title: Handle nulls in DataTransferObjectMapper

DataTransferObjectMapper was using toJdbcValue when it should have been using toDomainValue. This forced a tweak of aggregate generics to handle SmallInt. SmallInt is a good test because it has a different domain and JDBC type. Some extra code was needed to add toDomainValue to aggregates. I also needed to add toDomainValue(ResultSet, int) helper to ColumnExpression defined as toDomainValue(toJdbcValue(ResultSet, int)) so the generics type check correctly in DataTransferObjectMapper. I tried putting toDomainValue(toJdbcValue(ResultSet, int)) directly in DataTransferObjectMapper, but they were being called on ColumnExpression and Java's type capture did not recognize that the return value of toJdbcValue was the same type as the argument of toDomainValue.