Examples of browseClass()


Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);

    try {
      // BROWSE ALL THE RECORDS OF THE SOURCE CLASS
      for (ODocument doc : db.browseClass(sourceClass.getName())) {
        value = doc.field(sourceField);

        if (value != null) {
          if (value instanceof ODocument || value instanceof ORID) {
            // ALREADY CONVERTED
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

    return (T) javaClass.newInstance();
  }

  public void validateInstances() {
    final ODatabaseDocumentTx db = (ODatabaseDocumentTx) getDatabase();
    for (ODocument d : db.browseClass(name, true)) {
      d.validate();
    }
  }

  public OClass getSuperClass() {
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

        throw new IllegalArgumentException("Invalid class '" + urlParts[2] + "'");

      final int limit = urlParts.length > 3 ? Integer.parseInt(urlParts[3]) : 20;

      final List<ORecord<?>> response = new ArrayList<ORecord<?>>();
      for (ORecord<?> rec : db.browseClass(urlParts[2])) {
        if (limit > 0 && response.size() >= limit)
          break;

        response.add(rec);
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

    long tot = database.countClass("Account");

    // DELETE ALL THE Account OBJECTS
    int i = 0;
    for (ODocument rec : database.browseClass("Account")) {
      rec.delete();
      i++;
    }

    Assert.assertEquals(i, tot);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);

    try {
      // BROWSE ALL THE RECORDS OF THE SOURCE CLASS
      for (ODocument doc : db.browseClass(sourceClass.getName())) {
        value = doc.field(sourceField);

        if (value != null) {
          if (value instanceof ODocument || value instanceof ORID) {
            // ALREADY CONVERTED
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);

    try {
      // BROWSE ALL THE RECORDS OF THE SOURCE CLASS
      for (ODocument doc : db.browseClass(sourceClass.getName())) {
        value = doc.field(sourceField);

        if (value != null) {
          if (value instanceof ODocument || value instanceof ORID) {
            // ALREADY CONVERTED
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.browseClass()

      progressListener.onBegin(this, totRecords, false);

    database.declareIntent(new OIntentMassiveInsert());
    try {
      // BROWSE ALL THE RECORDS OF THE SOURCE CLASS
      for (ODocument doc : db.browseClass(sourceClass.getName())) {
        value = doc.field(sourceField);

        if (value != null) {
          if (value instanceof ODocument || value instanceof ORID) {
            // ALREADY CONVERTED
View Full Code Here

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

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

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

      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
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.