Examples of OIdentifiable


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

  }

  @SuppressWarnings("unchecked")
  @Override
  public REC next() {
    final OIdentifiable rec = super.next();
    if (rec == null)
      return null;
    return (REC) rec.getRecord();
  }
View Full Code Here

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

  }

  @SuppressWarnings("unchecked")
  @Override
  public REC previous() {
    final OIdentifiable rec = super.previous();
    if (rec == null)
      return null;

    return (REC) rec.getRecord();
  }
View Full Code Here

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

        final Object o = iter.next();
        if (o == null)
          continue;

        if (o instanceof OIdentifiable) {
          OIdentifiable d = (OIdentifiable) o;

          // GO RECURSIVELY
          final Integer fieldDepthLevel = parsedRecords.get(d.getIdentity());
          if (!d.getIdentity().isPersistent() || (fieldDepthLevel != null && fieldDepthLevel.intValue() == iLevelFromRoot)) {
            removeParsedFromMap(parsedRecords, d);
            d = d.getRecord();

            if (d == null)
              iListener.processStandardField(null, d, null, iContext, iUserObject, "");
            else if (!(d instanceof ODocument)) {
              iListener.processStandardField(null, d, fieldName, iContext, iUserObject, "");
View Full Code Here

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

       final OIndex<?> index = db.getMetadata().getIndexManager().getIndex(urlParts[2]);
       if (index == null)
         throw new IllegalArgumentException("Index name '" + urlParts[2] + "' not found");

       final OIdentifiable record;

       if (urlParts.length > 4)
         // GET THE RECORD ID AS VALUE
         record = new ORecordId(urlParts[4]);
       else {
View Full Code Here

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

    } catch (Exception ex) {
      OLogManager.instance().error(this, "illegal mode " + ex.getMessage());
      mode = ALLOW_MODES.DENY_ALL_BUT;
    }

    final OIdentifiable role = document.field("inheritedRole");
    parentRole = role != null ? document.getDatabase().getMetadata().getSecurity().getRole(role) : null;

    final Map<String, Number> storedRules = document.field("rules");
    if (storedRules != null)
      for (Entry<String, Number> a : storedRules.entrySet()) {
View Full Code Here

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

  @Override
  public void convertLinks2Records() {
    TreeMap<OIdentifiable, Change> newChanges = new TreeMap<OIdentifiable, Change>();
    for (Map.Entry<OIdentifiable, Change> entry : changes.entrySet()) {
      final OIdentifiable key = entry.getKey().getRecord();
      newChanges.put((key == null) ? entry.getKey() : key, entry.getValue());
    }

    changes.clear();
    changes.putAll(newChanges);
View Full Code Here

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

  @Override
  public boolean convertRecords2Links() {
    final Map<OIdentifiable, Change> newChangedValues = new HashMap<OIdentifiable, Change>();
    for (Map.Entry<OIdentifiable, Change> entry : changes.entrySet()) {
      OIdentifiable identifiable = entry.getKey();
      if (identifiable instanceof ORecord) {
        ORID identity = identifiable.getIdentity();
        ORecord record = (ORecord) identifiable;
        if (identity.isNew() || record.isDirty()) {
          record.save();
          identity = record.getIdentity();
        }
View Full Code Here

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

    for (Map.Entry<OIdentifiable, OModifiableInteger> entry : treeRidBag.newEntries.entrySet()) {
      mergeDiffEntry(entry.getKey(), entry.getValue().getValue());
    }

    for (Map.Entry<OIdentifiable, Change> entry : treeRidBag.changes.entrySet()) {
      final OIdentifiable rec = entry.getKey();
      final Change change = entry.getValue();
      final int diff;
      if (change instanceof DiffChange)
        diff = ((DiffChange) change).delta;
      else if (change instanceof AbsoluteChange)
View Full Code Here

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

        }
      }
    }

    for (Map.Entry<OIdentifiable, OModifiableInteger> entry : newEntries.entrySet()) {
      OIdentifiable identifiable = entry.getKey();
      assert identifiable instanceof ORecord;
      ((ORecord) identifiable).save();
      Change c = changes.get(identifiable);

      final int delta = entry.getValue().intValue();
View Full Code Here

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

        ORecordId rid = OLinkSerializer.INSTANCE.deserialize(stream, offset);
        offset += OLinkSerializer.RID_SIZE;
        Change change = ChangeSerializationHelper.INSTANCE.deserializeChange(stream, offset);
        offset += Change.SIZE;

        final OIdentifiable identifiable;
        if (rid.isTemporary() && rid.getRecord() != null)
          identifiable = rid.getRecord();
        else
          identifiable = rid;
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.