Package com.orientechnologies.orient.core.db.document

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


    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

        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

    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

    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

    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

      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

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.