/** * {@inheritDoc} * * @throws SQLException * @see edu.upenn.cis.orchestra.localupdates.apply.sql.IApplierStatements#apply() */ @Override public int apply() throws SQLException { int result = rInsIfDerivableForDeletions.apply(); logger.debug( "{} resulted in {} updates.", rInsIfDerivableForDeletions, Integer.valueOf((result))); int total = result; result = lDelIfLocalForDeletions.apply(); logger.debug("{} resulted in {} updates.", lDelIfLocalForDeletions, Integer.valueOf((result))); total += result; result = lInsForInsertions.apply(); logger.debug("{} resulted in {} updates.", lInsForInsertions, Integer.valueOf((result))); total += result; result = rDelIfRejectedForInsertions.apply(); logger.debug( "{} resulted in {} updates.", rDelIfRejectedForInsertions, Integer.valueOf((result))); total += result; return total; }
private void addInsertion(Tuple tuple) throws Exception { lInsForInsertions.handleTuple(tuple); rDelIfRejectedForInsertions.handleTuple(tuple); }
private void addDeletion(Tuple tuple) throws Exception { rInsIfDerivableForDeletions.handleTuple(tuple); lDelIfLocalForDeletions.handleTuple(tuple); }