Examples of ORecordLazySet


Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

      // REMOVE BEGIN & END COLLECTIONS CHARACTERS IF IT'S A COLLECTION
      final String value = iValue.startsWith("[") ? iValue.substring(1, iValue.length() - 1) : iValue;

      return iType == OType.LINKLIST ? new ORecordLazyList(iSourceRecord).setStreamedContent(new StringBuilder(value))
          : new ORecordLazySet(iSourceRecord).setStreamedContent(new StringBuilder(value));
    }

    case LINKMAP: {
      if (iValue.length() == 0)
        return null;
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

      OProfiler.getInstance().stopChrono("serializer.rec.str.linkList2string", timer);
      break;
    }

    case LINKSET: {
      final ORecordLazySet coll;

      if (!(iValue instanceof ORecordLazySet)) {
        // FIRST TIME: CONVERT THE ENTIRE COLLECTION
        coll = new ORecordLazySet(iRecord);
        coll.addAll((Collection<? extends OIdentifiable>) iValue);
        ((Collection<? extends OIdentifiable>) iValue).clear();

        iRecord.field(iName, coll);
      } else
        // LAZY SET
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

    final Collection<?> coll;
    if (iLinkedType == OType.LINK) {
      if (iDocument != null)
        coll = iType == OType.EMBEDDEDLIST ? new ORecordLazyList(iDocument).setStreamedContent(new StringBuilder(value))
            : new ORecordLazySet(iDocument).setStreamedContent(new StringBuilder(value));
      else
        coll = iType == OType.EMBEDDEDLIST ? new ORecordLazyList(iDatabase).setStreamedContent(new StringBuilder(value))
            : new ORecordLazySet(iDatabase).setStreamedContent(new StringBuilder(value));

      // LAZY LOADED: RETURN
      return coll;
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

    } else if (iFieldValue.startsWith("[") && iFieldValue.endsWith("]")) {

      // EMBEDDED VALUES
      final Collection<?> embeddedCollection;
      if (iType == OType.LINKSET)
        embeddedCollection = new ORecordLazySet(iRecord);
      else if (iType == OType.EMBEDDEDSET)
        embeddedCollection = new OTrackedSet<Object>(iRecord);
      else if (iType == OType.LINKLIST)
        embeddedCollection = new ORecordLazyList(iRecord);
      else
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

    acquireExclusiveLock();

    try {
      Set<OIdentifiable> values = map.get(iKey);
      if (values == null)
        values = new ORecordLazySet(configuration.getDatabase());

      if (!iSingleValue.getIdentity().isValid())
        iSingleValue.save();

      values.add(iSingleValue);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

    try {
      Set<OIdentifiable> values = map.get(iKey);

      if (values == null)
        values = new ORecordLazySet(configuration.getDatabase());
      else if (values.size() == 1) {
        // CHECK IF THE ID IS THE SAME OF CURRENT: THIS IS THE UPDATE CASE
        if (!values.contains(iSingleValue))
          throw new OIndexException("Found duplicated key '" + iKey + "' on unique index '" + name + "'");
        else
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

      // REMOVE BEGIN & END COLLECTIONS CHARACTERS IF IT'S A COLLECTION
      final String value = iValue.startsWith("[") ? iValue.substring(1, iValue.length() - 1) : iValue;

      return iType == OType.LINKLIST ? new ORecordLazyList(iSourceRecord).setStreamedContent(new StringBuilder(value))
          : new ORecordLazySet(iSourceRecord).setStreamedContent(new StringBuilder(value));
    }

    case LINKMAP: {
      if (iValue.length() == 0)
        return null;
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

      OProfiler.getInstance().stopChrono("serializer.rec.str.linkList2string", timer);
      break;
    }

    case LINKSET: {
      final ORecordLazySet coll;

      if (!(iValue instanceof ORecordLazySet)) {
        // FIRST TIME: CONVERT THE ENTIRE COLLECTION
        coll = new ORecordLazySet(iRecord);
        coll.addAll((Collection<? extends OIdentifiable>) iValue);
        ((Collection<? extends OIdentifiable>) iValue).clear();

        iRecord.field(iName, coll);
      } else
        // LAZY SET
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

    final Collection<?> coll;
    if (iLinkedType == OType.LINK) {
      if (iDocument != null)
        coll = iType == OType.EMBEDDEDLIST ? new ORecordLazyList(iDocument).setStreamedContent(new StringBuilder(value))
            : new ORecordLazySet(iDocument).setStreamedContent(new StringBuilder(value));
      else
        coll = iType == OType.EMBEDDEDLIST ? new ORecordLazyList(iDatabase).setStreamedContent(new StringBuilder(value))
            : new ORecordLazySet(iDatabase).setStreamedContent(new StringBuilder(value));

      // LAZY LOADED: RETURN
      return coll;
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ORecordLazySet

      try {
        // SEARCH FOR THE WORD
        refs = map.get(word);
        if (refs == null)
          // WORD NOT EXISTS: CREATE THE KEYWORD CONTAINER THE FIRST TIME THE WORD IS FOUND
          refs = new ORecordLazySet(configuration.getDatabase());

        // ADD THE CURRENT DOCUMENT AS REF FOR THAT WORD
        refs.add(iSingleValue);

        // SAVE THE INDEX ENTRY
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.