Examples of OMVRBTreeRIDSet


Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

      final Object fieldValue, final String fieldName, final int iCurrentLevel, final int iLevelFromRoot,
      final int iFieldDepthLevel, final Map<ORID, Integer> parsedRecords, final String iFieldPathFromRoot,
      final OFetchListener iListener, final OFetchContext iContext) throws IOException {
    final Iterable<?> linked;
    if (fieldValue instanceof ODocument)
      linked = new OMVRBTreeRIDSet().fromDocument((ODocument) fieldValue);
    else if (fieldValue instanceof Iterable<?> || fieldValue instanceof ORidBag) {
      linked = (Iterable<OIdentifiable>) fieldValue;
      iContext.onBeforeCollection(iRootRecord, fieldName, iUserObject, (Iterable) linked);
    } else if (fieldValue instanceof Map<?, ?>) {
      linked = (Collection<?>) ((Map<?, ?>) fieldValue).values();
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

    public Set convert(Set value) {
      boolean updated = false;
      final Set result;

      if (value instanceof OMVRBTreeRIDSet) {
        OMVRBTreeRIDSet ridSet = new OMVRBTreeRIDSet();
        ridSet.setAutoConvertToRecord(false);

        result = ridSet;
      } else
        result = new HashSet();
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

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

      return iType == OType.LINKLIST ? new ORecordLazyList((ODocument) iSourceRecord).setStreamedContent(new StringBuilder(value))
          : new OMVRBTreeRIDSet(iSourceRecord).fromStream(new StringBuilder(iValue));
    }

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

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

    case LINKSET: {
      final OStringBuilderSerializable coll;

      if (!(iValue instanceof OMVRBTreeRIDSet)) {
        // FIRST TIME: CONVERT THE ENTIRE COLLECTION
        coll = new OMVRBTreeRIDSet(iRecord, (Collection<OIdentifiable>) iValue);

        if (!(iValue instanceof ORecordLazySet))
          iRecord.field(iName, coll);
      } else
        // LAZY SET
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

    Collection<?> coll;
    if (iLinkedType == OType.LINK) {
      if (iDocument != null)
        coll = (Collection<?>) (iType == OType.EMBEDDEDLIST ? new ORecordLazyList(iDocument).setStreamedContent(new StringBuilder(
            value)) : new OMVRBTreeRIDSet(iDocument).fromStream(new StringBuilder(value)));
      else {
        if (iType == OType.EMBEDDEDLIST)
          coll = (Collection<?>) new ORecordLazyList().setStreamedContent(new StringBuilder(value));
        else {
          final OMVRBTreeRIDSet set = new OMVRBTreeRIDSet();
          set.setAutoConvertToRecord(false);
          set.fromStream(new StringBuilder(value));
          return set;
        }
      }
    } else
      coll = iType == OType.EMBEDDEDLIST ? new OTrackedList<Object>(iDocument) : new OTrackedSet<Object>(iDocument);
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

    response().setContentType("application/json");
    try {
      for (ODocument doc : listOfDoc){
        doc.detach();
        if ( doc.field("user") instanceof ODocument) {
          OMVRBTreeRIDSet roles = ((ODocument) doc.field("user")).field("roles");
          if (roles.size()>1){
            Iterator<OIdentifiable> it = roles.iterator();
            while (it.hasNext()){
              if (((ODocument)it.next().getRecord()).field("name").toString().startsWith(FriendShipService.FRIEND_ROLE_NAME)) {
                    it.remove();
                }
            }
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

              if (metadata != null && Boolean.TRUE.equals(metadata.field("durableInNonTxMode")))
                durable = true;

              refs = new OIndexRIDContainer(getName(), durable);
            } else {
              refs = new OMVRBTreeRIDSet();
              ((OMVRBTreeRIDSet) refs).setAutoConvertToRecord(false);
            }
          }

          // ADD THE CURRENT DOCUMENT AS REF FOR THAT WORD
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

          if (metadata != null && Boolean.TRUE.equals(metadata.field("durableInNonTxMode")))
            durable = true;

          refs = new OIndexRIDContainer(getName(), durable);
        } else {
          refs = new OMVRBTreeRIDSet();
          ((OMVRBTreeRIDSet) refs).setAutoConvertToRecord(false);
        }

        snapshot.put(word, refs);
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

            if (metadata != null && Boolean.TRUE.equals(metadata.field("durableInNonTxMode")))
              durable = true;

            values = new OIndexRIDContainer(getName(), durable);
          } else {
            values = new OMVRBTreeRIDSet(OGlobalConfiguration.MVRBTREE_RID_BINARY_THRESHOLD.getValueAsInteger());
            ((OMVRBTreeRIDSet) values).setAutoConvertToRecord(false);
          }
        }

        if (!iSingleValue.getIdentity().isValid())
View Full Code Here

Examples of com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet

        if (metadata != null && Boolean.TRUE.equals(metadata.field("durableInNonTxMode")))
          durable = true;

        values = new OIndexRIDContainer(getName(), durable);
      } else {
        values = new OMVRBTreeRIDSet(OGlobalConfiguration.MVRBTREE_RID_BINARY_THRESHOLD.getValueAsInteger());
        ((OMVRBTreeRIDSet) values).setAutoConvertToRecord(false);
      }

      snapshot.put(key, values);
    }
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.