@Override
    public DateTime getValue(ResultSet rs, int startIndex) throws SQLException {
        Timestamp ts = rs.getTimestamp(startIndex);
        return ts != null ? new DateTime(ts.getTime()) : null;
    }
{@code DateTimeType} maps {@linkplain org.joda.time.DateTime}
to {@linkplain java.sql.Timestamp} on the JDBC level

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/types/DateTimeType.java