Package org.openntf.domino

Examples of org.openntf.domino.DateTime$Schema


    }
    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);
          // Factory.wrappedEvaluate(session, entry.getKey(), source);
          if (strategy == Strategy.CREATE_AND_REPLACE) {
            target.replaceItemValue(targetItemName, sourceValue);
            // targetDirty = true;
          } else {
            Item targetItem = target.getFirstItem(targetItemName);
            if (strategy == Strategy.REPLACE_IF_NEWER) {
              DateTime itemLastMod = targetItem.getLastModified();
              if (sourceLastMod.isAfter(itemLastMod)) {
                targetItem.setValues(sourceValue);
                // targetDirty = true;
              }
            } else if (strategy == Strategy.REPLACE_ONLY) {
View Full Code Here

TOP

Related Classes of org.openntf.domino.DateTime$Schema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.