Package com.orientechnologies.orient.object.db

Examples of com.orientechnologies.orient.object.db.OObjectDatabaseTx.browseClass()


      Profile person2 = new Profile();
      person2.setNick("Guy2");
      person2.setName("Guy");
      person2.setSurname("Brush");
      person2 = db.save(person2);
      OObjectIteratorClass<Profile> it = db.browseClass(Profile.class);
      while (it.hasNext()) {
        System.out.println(it.next());
      }

      db.commit();
View Full Code Here


      Profile person2 = new Profile();
      person2.setNick("Guy2");
      person2.setName("Guy");
      person2.setSurname("Brush");
      person2 = db.save(person2);
      OObjectIteratorClass<Profile> it = db.browseClass(Profile.class);
      while (it.hasNext()) {
        System.out.println(it.next());
      }

      db.commit();
View Full Code Here

      account = database.reload(account, true); // ignore cache, get a copy of author from the datastore
      Assert.assertEquals(account.getAddresses().size(), 2); // this is fine, author still linked to 2 books
      Assert.assertEquals(account.getName(), originalName); // name is restored

      int bookCount = 0;
      for (Address b : database.browseClass(Address.class)) {
        if (b.getStreet().equals("Mulholland drive") || b.getStreet().equals("Via Veneto"))
          bookCount++;
      }
      Assert.assertEquals(bookCount, 2); // this fails, only 1 entry in the datastore :(
    } finally {
View Full Code Here

        Item item = new Item();
        item.description = "Description";
        item.name = "Item578";
        db.save(item);
        assertEquals(1, db.countClass(Item.class));
        for (Item it : db.browseClass(Item.class)) {
            assertNotNull(db.getIdentity(it).toString());
            assertEquals("Item578", it.name);
            db.delete(it);
        }
    }
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.