Package org.openntf.domino

Examples of org.openntf.domino.View


    }
    return result;
  }

  private View getEdgeView() {
    View result = getRawDatabase().getView(DominoGraph.EDGE_VIEW_NAME);
    if (result == null) {
      result = getRawDatabase().createView(DominoGraph.EDGE_VIEW_NAME,
          "SELECT " + DominoElement.TYPE_FIELD + "=\"" + DominoEdge.GRAPH_TYPE_VALUE + "\"", null, false);
      org.openntf.domino.ViewColumn column1 = result.createColumn();
      column1.setTitle("Created");
      column1.setFormula("@Created");
      column1.setSortDescending(true);
    }
    return result;
View Full Code Here


    }
    return result;
  }

  private View getVertexView() {
    View result = getRawDatabase().getView(DominoGraph.VERTEX_VIEW_NAME);
    if (result == null) {
      result = getRawDatabase().createView(DominoGraph.VERTEX_VIEW_NAME,
          "SELECT " + DominoElement.TYPE_FIELD + "=\"" + DominoVertex.GRAPH_TYPE_VALUE + "\"", null, false);
      org.openntf.domino.ViewColumn column1 = result.createColumn();
      column1.setTitle("Created");
      column1.setFormula("@Created");
      column1.setSortDescending(true);
    }
    return result;
View Full Code Here

   */
  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);
View Full Code Here

TOP

Related Classes of org.openntf.domino.View

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.