Package com.orientechnologies.orient.core.exception

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


  public boolean cleanOutRecord(final ORecordId rid, final ORecordVersion iVersion, final boolean iRequired, final int iMode) {
    try {
      final boolean result = storage.cleanOutRecord(rid, iVersion, iMode, null);
      if (!result && iRequired)
        throw new ORecordNotFoundException("The record with id " + rid + " was not found");
      return result;
    } catch (OException e) {
      // PASS THROUGH
      throw e;
    } catch (Exception e) {
View Full Code Here


       final boolean iIgnoreCache, final ORecordCallback<ORawBuffer> iCallback, boolean loadTombstones,
       LOCKING_STRATEGY iLockingStrategy) {

     if (deletedRecords.get(iRecordId) != null)
       // DELETED
       throw new ORecordNotFoundException("Record " + iRecordId + " was not found");

     try {
       final String clusterName = getClusterNameByRID(iRecordId);

       final ODistributedConfiguration dbCfg = dManager.getDatabaseConfiguration(getName());
View Full Code Here

   public OStorageOperationResult<ORecordVersion> updateRecord(final ORecordId iRecordId, boolean updateContent,
       final byte[] iContent, final ORecordVersion iVersion, final byte iRecordType, final int iMode,
       final ORecordCallback<ORecordVersion> iCallback) {
     if (deletedRecords.get(iRecordId) != null)
       // DELETED
       throw new ORecordNotFoundException("Record " + iRecordId + " was not found");

     if (OScenarioThreadLocal.INSTANCE.get() == RUN_MODE.RUNNING_DISTRIBUTED)
       // ALREADY DISTRIBUTED
       return wrapped.updateRecord(iRecordId, updateContent, iContent, iVersion, iRecordType, iMode, iCallback);
View Full Code Here

     ODistributedServerLog.debug(this, iManager.getLocalNodeName(), getNodeSource(), DIRECTION.IN, "updating record %s/%s v.%s",
         database.getName(), rid.toString(), version.toString());

     ORecord loadedRecord = rid.getRecord();
     if (loadedRecord == null)
       throw new ORecordNotFoundException("Record " + rid + " was not found on update");

     if (loadedRecord instanceof ODocument) {
       // APPLY CHANGES FIELD BY FIELD TO MARK DIRTY FIELDS FOR INDEXES/HOOKS
       final ODocument newDocument = new ODocument().fromStream(content);
       ((ODocument) loadedRecord).merge(newDocument, false, false);
View Full Code Here

     final ORecord currentRecord;
     if (newRecord instanceof ODocument) {
       currentRecord = iDatabase.load(rid);

       if (currentRecord == null)
         throw new ORecordNotFoundException(rid.toString());

       ((ODocument) currentRecord).merge((ODocument) newRecord, false, false);

     } else
       currentRecord = newRecord;
View Full Code Here

          // SPECIAL CASE FOR UPDATE: WE NEED TO LOAD THE RECORD AND APPLY CHANGES TO GET WORKING HOOKS (LIKE INDEXES)

          final ORecord record = entry.getValue().record.getRecord();
          final ORecord loadedRecord = record.getIdentity().copy().getRecord();
          if (loadedRecord == null)
            throw new ORecordNotFoundException(record.getIdentity().toString());

          if (ORecordInternal.getRecordType(loadedRecord) == ODocument.RECORD_TYPE
              && ORecordInternal.getRecordType(loadedRecord) == ORecordInternal.getRecordType(record)) {
            ((ODocument) loadedRecord).merge((ODocument) record, false, false);
            loadedRecord.getRecordVersion().copyFrom(record.getRecordVersion());
View Full Code Here

TOP

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

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.