Examples of OTraverse


Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

        .execute();
    Assert.assertEquals(result1.size(), totalElements);
  }

  public void traverseAPIAllFromActorNoWhere() {
    List<OIdentifiable> result1 = new OTraverse().fields("*").target(tomCruise.getIdentity()).execute();
    Assert.assertEquals(result1.size(), totalElements);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

  }

  @Test
  public void traverseAPIIterating() {
    int cycles = 0;
    for (OIdentifiable id : new OTraverse().target(database.browseClass("Movie").iterator()).predicate(new OCommandPredicate() {
      @Override
      public Object evaluate(ORecord iRecord, ODocument iCurrentResult, OCommandContext iContext) {
        return ((Integer) iContext.getVariable("depth")) <= 2;
      }
    })) {
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

  }

  @Test
  public void traverseAPIandSQLIterating() {
    int cycles = 0;
    for (OIdentifiable id : new OTraverse().target(database.browseClass("Movie").iterator()).predicate(
        new OSQLPredicate("$depth <= 2"))) {
      cycles++;
    }
    Assert.assertTrue(cycles > 0);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

  /**
   * Returns a OTraverse object to start traversing the graph.
   */
  public OTraverse traverse() {
    return new OTraverse();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

  /**
   * Returns a OTraverse object to start traversing from the current vertex.
   */
  public OTraverse traverse() {
    setCurrentGraphInThreadLocal();
    return new OTraverse().target(getRecord());
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

  /**
   * Returns a OTraverse object to start traversing the graph.
   */
  public OTraverse traverse() {
    return new OTraverse();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.traverse.OTraverse

   * Returns a OTraverse object to start traversing from the current vertex.
   */
  public OTraverse traverse() {
    graph.setCurrentGraphInThreadLocal();

    return new OTraverse().target(getRecord());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.