Package com.orientechnologies.orient.core.db.record

Examples of com.orientechnologies.orient.core.db.record.ODatabaseFlat.newInstance()


  }

  public void testDictionaryCreate() throws IOException {
    ODatabaseFlat database = new ODatabaseFlat(url);
    database.open("admin", "admin");
    ORecordFlat record = database.newInstance();

    database.getDictionary().put("key1", record.value("Dictionary test!"));

    database.close();
  }
View Full Code Here


    ODatabaseFlat database = new ODatabaseFlat(url);
    database.open("admin", "admin");

    final long originalSize = database.getDictionary().size();

    database.getDictionary().put("key1", database.newInstance().value("Text changed"));

    database.close();
    database.open("admin", "admin");

    Assert.assertEquals(((ORecordFlat) database.getDictionary().get("key1")).value(), "Text changed");
View Full Code Here

    // ASSURE TO STORE THE PAGE-SIZE + 3 FORCING THE CREATION OF LEFT AND RIGHT
    final int total = 1000;

    for (int i = total; i > 0; --i) {
      database.getDictionary().put("key-" + (originalSize + i), database.newInstance().value("test-dictionary-" + i));
    }

    for (int i = total; i > 0; --i) {
      ORecord record = database.getDictionary().get("key-" + (originalSize + i));
      record.toString().equals("test-dictionary-" + i);
View Full Code Here

  public void testDictionaryInTx() throws IOException {
    ODatabaseFlat database = new ODatabaseFlat(url);
    database.open("admin", "admin");

    database.begin();
    database.getDictionary().put("tx-key", database.newInstance().value("tx-test-dictionary"));
    database.commit();

    Assert.assertNotNull(database.getDictionary().get("tx-key"));

    database.close();
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.