Package org.openntf.domino.helpers

Examples of org.openntf.domino.helpers.DocumentSyncHelper


    Utils.addAllListeners(currDb);
    java.util.Map<Object, String> syncMap = new java.util.HashMap<Object, String>();
    syncMap.put("Key", "State");
    syncMap.put("Name", "StateName");
    syncMap.put("@Now", "LastSync");
    DocumentSyncHelper helper = new DocumentSyncHelper(DocumentSyncHelper.Strategy.CREATE_AND_REPLACE, syncMap,
        currDb.getServer(), currDb.getFilePath(), "AllContactsByState", "Key");
    View states = currDb.getView("AllStates");
    DocumentCollection sourceCollection = states.getAllDocuments();
    helper.process(sourceCollection);
    ExtLibUtil.getViewScope().put("javaTest", "Done");
  }
View Full Code Here


    syncMap.put("Address", "CompanyAddress");
    syncMap.put("City", "CompanyCity");
    syncMap.put("State", "CompanyState");
    syncMap.put("ZIP", "CompanyZIP");
    syncMap.put("@Now", "LastSync");
    DocumentSyncHelper helper = new DocumentSyncHelper(DocumentSyncHelper.Strategy.CREATE_AND_REPLACE, syncMap);
    helper.setTargetServer(targetDb.getServer());
    helper.setTargetFilepath(targetDb.getFilePath());
    helper.setTargetLookupView("byCompanyID");
    helper.setTargetDatabase(targetDb, "byCompanyID");

    helper.setSourceKeyFormula("CompID");
    java.util.Date sinceDate = new java.util.Date(0);
    org.openntf.domino.DateTime dt = sourceDb.getAncestorSession().createDateTime(sinceDate);
    org.openntf.domino.DocumentCollection sourceCollection = sourceDb.getModifiedDocuments(dt);
    helper.process(sourceCollection);
    helper.setTransactionRule(DocumentSyncHelper.TransactionRule.COMMIT_EVERY_SOURCE);
    helper.processSince(sourceDb, sinceDate);
  }
View Full Code Here

TOP

Related Classes of org.openntf.domino.helpers.DocumentSyncHelper

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.