Ejemplo n.º 1
0
 protected Row createRow(Value[] values) {
   Row newRow = table.getTemplateRow();
   for (int j = 0; j < columns.length; j++) {
     Column c = columns[j];
     int index = c.getColumnId();
     Value v = c.convert(values[j]);
     newRow.setValue(index, v);
   }
   return newRow;
 }
Ejemplo n.º 2
0
 protected Row createRow(Expression[] expr, int rowId) {
   Row newRow = table.getTemplateRow();
   for (int i = 0, len = columns.length; i < len; i++) {
     Column c = columns[i];
     int index = c.getColumnId();
     Expression e = expr[i];
     if (e != null) {
       // e can be null (DEFAULT)
       try {
         Value v = c.convert(e.getValue(session));
         newRow.setValue(index, v);
       } catch (DbException ex) {
         throw setRow(ex, rowId, getSQL(expr));
       }
     }
   }
   return newRow;
 }