Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OTransactionException


        case OTransactionRecordEntry.DELETED:
          entry.getRecord().fill(database, rid, channel.readInt(), null, false);
          break;

        default:
          throw new OTransactionException("Unrecognized tx command: " + entry.status);
        }

        // PUT IN TEMPORARY LIST TO GET FETCHED AFTER ALL FOR CACHE
        recordEntries.put((ORecordId) entry.getRecord().getIdentity(), entry);
View Full Code Here


              "@Version field has been declared as %s while the supported are: Number, String, Object", ver.getClass());
      }
    }

    if (!versionConfigured && iRecord.getDatabase().getTransaction() instanceof OTransactionOptimistic)
      throw new OTransactionException("Can't involve an object of class '" + pojoClass
          + "' in an Optimistic Transaction commit because it doesn't define @Version or @OVersion and therefore can't handle MVCC");

    // SET OBJECT CLASS
    iRecord.setClassName(schemaClass != null ? schemaClass.getName() : null);
View Full Code Here

    try {
      // READ CURRENT RECORD CONTENT
      final ORawBuffer buffer = storage.readRecord(iClusterSegment, iRid, true);

      if (buffer == null)
        throw new OTransactionException("Can't retrieve the updated record #" + iRid);

      // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
      if (iVersion > -1 && buffer.version != iVersion)
        throw new OConcurrentModificationException(
            "Can't update the record "
View Full Code Here

      indexEntry.getChangesPerKey(iKey).add(iValue, iOperation);
  }

  protected void checkTransaction() {
    if (status == TXSTATUS.INVALID)
      throw new OTransactionException("Invalid state of the transaction. The transaction must be begun.");
  }
View Full Code Here

    }
  }

  protected void checkTransaction() {
    if (currentTx == null || currentTx.getStatus() == TXSTATUS.INVALID)
      throw new OTransactionException("Transaction not started");
  }
View Full Code Here

        case OTransactionEntry.DELETED:
          entry.getRecord().setVersion(iChannel.readInt());
          break;

        default:
          throw new OTransactionException("Unrecognized tx command: " + entry.status);
        }

        // PUT IN TEMPORARY LIST TO GET FETCHED AFTER ALL FOR CACHE
        entries.put((ORecordId) entry.getRecord().getIdentity(), entry);
View Full Code Here

        case OTransactionRecordEntry.DELETED:
          entry.getRecord().setVersion(iChannel.readInt());
          break;

        default:
          throw new OTransactionException("Unrecognized tx command: " + entry.status);
        }

        // PUT IN TEMPORARY LIST TO GET FETCHED AFTER ALL FOR CACHE
        recordEntries.put((ORecordId) entry.getRecord().getIdentity(), entry);
View Full Code Here

              "@Version field has been declared as %s while the supported are: Number, String, Object", ver.getClass());
      }
    }

    if (!versionConfigured && iRecord.getDatabase().getTransaction() instanceof OTransactionOptimistic)
      throw new OTransactionException("Can't involve an object of class '" + pojoClass
          + "' in an Optimistic Transaction commit because it doesn't define @Version or @OVersion and therefore can't handle MVCC");

    // SET OBJECT CLASS
    iRecord.setClassName(schemaClass != null ? schemaClass.getName() : null);
View Full Code Here

    getStorage().commit(currentTx);
  }

  protected void checkTransaction() {
    if (currentTx == null || currentTx.getStatus() == TXSTATUS.INVALID)
      throw new OTransactionException("Transaction not started");
  }
View Full Code Here

  }

  @Override
  protected void checkTransaction() {
    if (status == TXSTATUS.INVALID)
      throw new OTransactionException("Invalid state of the transaction. The transaction must be begun.");
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OTransactionException

Copyright © 2018 www.massapicom. 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.