Examples of ORID


Examples of com.orientechnologies.orient.core.id.ORID

    database.getLevel1Cache().clear();
    List<ODocument> resultset = database.query(new OSQLSynchQuery<ODocument>("select * from Profile"));
    Assert.assertEquals(OProfiler.getInstance().getCounter("Cache.reused"), times);

    ORID linked;
    for (ODocument d : resultset) {
      linked = ((ORID) d.field("location", ORID.class));
      if (linked != null)
        Assert.assertFalse(database.getLevel1Cache().existsRecord(linked));
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    return tot;
  }

  @Override
  public OIndex put(final Object iKey, OIdentifiable iValue) {
    final ORID rid = iValue.getIdentity();

    if (!rid.isValid())
      // EARLY SAVE IT
      ((ORecord<?>) iValue).save();

    database.getTransaction().addIndexEntry(delegate, super.getName(), OPERATION.PUT, iKey, rid);
    return this;
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    long totalRecords = 0;

    System.out.print("\nImporting records...");

    ORID rid;
    int lastClusterId = 0;
    long clusterRecords = 0;
    while (jsonReader.lastChar() != ']') {
      rid = importRecord();

      if (rid != null) {
        ++clusterRecords;

        if (rid.getClusterId() != lastClusterId || jsonReader.lastChar() == ']') {
          // CHANGED CLUSTERID: DUMP STATISTICS
          System.out.print("\n- Imported records into cluster '" + database.getClusterNameById(lastClusterId) + "' (id="
              + lastClusterId + "): " + clusterRecords + " records");
          clusterRecords = 0;
          lastClusterId = rid.getClusterId();
        }

        ++totalRecords;
      } else
        lastClusterId = 0;
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

        doc.setClassName("Chunk");
        doc.field("hash", "key" + Integer.toString(i));
        doc.field("binary", new ORecordBytes(database, data));
        doc.save();

        ORID rid = doc.getIdentity();
        if (i % 100 == 0)
          System.out.println("ORID=" + rid);
      }
    } finally {
      database.close();
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    newDoc.field("embeddedList", list, OType.EMBEDDEDLIST);
    list.add(new ODocument().field("name", "Luca"));
    list.add(new ODocument(database, "Account").field("name", "Marcus"));

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    newDoc.field("linkedList", list, OType.LINKLIST);
    list.add(new ODocument().field("name", "Luca"));
    list.add(new ODocument(database, "Account").field("name", "Marcus"));

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    newDoc.field("embeddedSet", set, OType.EMBEDDEDSET);
    set.add(new ODocument().field("name", "Luca"));
    set.add(new ODocument(database, "Account").field("name", "Marcus"));

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    newDoc.field("linkedSet", set, OType.LINKSET);
    set.add(new ODocument().field("name", "Luca"));
    set.add(new ODocument(database, "Account").field("name", "Marcus"));

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    map.put("Luca", new ODocument().field("name", "Luca"));
    map.put("Marcus", new ODocument().field("name", "Marcus"));
    map.put("Cesare", new ODocument(database, "Account").field("name", "Cesare"));

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
View Full Code Here

Examples of com.orientechnologies.orient.core.id.ORID

    final Map<String, ODocument> map = new HashMap<String, ODocument>();
    newDoc.field("embeddedMap", map, OType.EMBEDDEDMAP);

    database.save(newDoc);
    final ORID rid = newDoc.getIdentity();

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
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.