Exemplo n.º 1
0
 void readRow(Object item, ResultSet rs) {
   for (int i = 0; i < fields.size(); i++) {
     FieldDefinition def = fields.get(i);
     Object o = def.read(rs, i + 1);
     def.setValue(item, o);
   }
 }
Exemplo n.º 2
0
 <Y, X> void copyAttributeValues(Query<Y> query, X to, X map) {
   for (FieldDefinition def : fields) {
     Object obj = def.getValue(map);
     SelectColumn<Y> col = query.getSelectColumn(obj);
     Object value = col.getCurrentValue();
     def.setValue(to, value);
   }
 }