*/
public void process(final DocumentCollection coll) {
// TODO Check to make sure properties are all set up before running
Session session = coll.getAncestorSession();
Database targetDb = session.getDatabase(getTargetServer(), getTargetFilepath());
View targetView = targetDb.getView(getTargetLookupView());
Strategy strategy = getStrategy();
DatabaseTransaction txn = null;
if (getTransactionRule() == TransactionRule.COMMIT_AT_END) {
txn = targetDb.startTransaction();
}
for (Document source : coll) {
if (getTransactionRule() == TransactionRule.COMMIT_EVERY_SOURCE) {
txn = targetDb.startTransaction();
}
DateTime sourceLastMod = source.getLastModified();
// Object lookupKey = Factory.wrappedEvaluate(session, getSourceKeyFormula(), source);
Object lookupKey = getSourceKeyFormula().getValue(source);
DocumentCollection targetColl = targetView.getAllDocumentsByKey(lookupKey, true);
for (Document target : targetColl) {
// boolean targetDirty = false;
for (Map.Entry<Formula, String> entry : getSyncMap().entrySet()) {
String targetItemName = entry.getValue();
java.util.Vector<?> sourceValue = entry.getKey().getValue(source);