Package com.orientechnologies.orient.core.storage

Examples of com.orientechnologies.orient.core.storage.ORecordDuplicatedException


            final Boolean mergeSameKey = metadata != null ? (Boolean) metadata.field(OIndex.MERGE_KEYS) : Boolean.FALSE;
            if (mergeSameKey != null && mergeSameKey)
              // IGNORE IT, THE EXISTENT KEY HAS BEEN MERGED
              ;
            else
              throw new ORecordDuplicatedException(String.format(
                  "Cannot index record %s: found duplicated key '%s' in index '%s' previously assigned to the record %s",
                  iSingleValue.getIdentity(), key, getName(), value.getIdentity()), value.getIdentity());
          } else
            return this;
        }
View Full Code Here


        final Iterator<OIdentifiable> valuesIterator = values.iterator();
        if (values.size() > 1) {
          final OIdentifiable valueOne = valuesIterator.next();
          final OIdentifiable valueTwo = valuesIterator.next();
          throw new ORecordDuplicatedException(String.format(
              "Cannot index record %s: found duplicated key '%s' in index '%s' previously assigned to the record %s",
              valueTwo.getIdentity(), key, getName(), valueOne.getIdentity()), valueOne.getIdentity());
        }

        final OIdentifiable value = valuesIterator.next();
View Full Code Here

        final ODocument metadata = getMetadata();
        final boolean mergeSameKey = metadata != null && (Boolean) metadata.field(OIndex.MERGE_KEYS);
        if (mergeSameKey) {
          return (ODocument) previousRecord.getRecord();
        } else
          throw new ORecordDuplicatedException(String.format(
              "Cannot index record %s: found duplicated key '%s' in index '%s' previously assigned to the record %s", iRecord,
              iKey, getName(), previousRecord), previousRecord.getIdentity());
      }
      return super.checkEntry(iRecord, iKey);
    }
View Full Code Here

              MERGE_RESULT result = mergeAndSaveRecord(retry, v.getRecord(), prop);
              switch (result) {
              case MERGED:
                return v;
              case ERROR:
                throw new ORecordDuplicatedException("Cannot create a new vertices", v.getIdentity());
              case RETRY:
                if (retry > maxRetries)
                  break;
              }
            }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.storage.ORecordDuplicatedException

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.