Ejemplo n.º 1
0
 @Override
 public Bundle rowOp(Bundle row) {
   if (col < row.getCount()) {
     BundleColumnBinder binder = getSourceColumnBinder(row);
     ValueObject oldval = binder.getColumn(row, col);
     if (oldval != null) {
       ValueString newval = map.get(oldval.toString());
       if (newval != null || mapToNull) {
         binder.setColumn(row, col, newval);
       }
     }
   }
   return row;
 }
Ejemplo n.º 2
0
 public boolean updateBundleWithMapAppend(Bundle bundle) {
   for (FieldValue fv : list) {
     ValueObject oldValue = bundle.getValue(fv.field);
     ValueMap newValue;
     if (oldValue == null) {
       newValue = ValueFactory.createMap();
     } else if (oldValue instanceof ValueMap) {
       newValue = (ValueMap) oldValue;
     } else {
       newValue = ValueFactory.createMap();
       newValue.put(oldValue.asString().asNative(), oldValue);
     }
     newValue.put(fv.value.asString().asNative(), fv.value);
     bundle.setValue(fv.field, newValue);
   }
   return !list.isEmpty();
 }