if ( updateCommands.size() > 0 ) {
List<List<Integer>> filteredTuples = new ArrayList<List<Integer>>();
for ( int c = 0; c < updateCommands.size(); c++ ) {
Command cmd = updateCommands.get(c);
if (cmd instanceof TranslatableProcedureContainer) {
TranslatableProcedureContainer update = (TranslatableProcedureContainer)cmd;
if ( update.getCriteria() != null ) {
// Build lookupMap from BOTH all the elements and the projected symbols - both may be needed here
Map<Object, Integer> lookupMap = new HashMap<Object, Integer>();
for(int i=0; i<elements.size(); i++) {
Object element = elements.get(i);
mapElementToIndex(lookupMap, element, new Integer(i), group);
}
for(int i=0; i<projectedSymbols.size(); i++) {
Object element = projectedSymbols.get(i);
mapElementToIndex(lookupMap, element, new Integer(columnMap[i]), group);
}
int updated = 0;
for(int i=0; i<tuples.length; i++) {
try {
if(new Evaluator(lookupMap, null, null).evaluate(update.getCriteria(), tuples[i])) {
updated++;
}
} catch(ExpressionEvaluationException e) {
throw new TeiidComponentException(e, e.getMessage());
}