Examples of NoteList


Examples of org.openntf.domino.big.impl.NoteList

  protected void removeEdge(final Edge edge) {
    getParent().startTransaction(this);
    String label = edge.getLabel();

    boolean inChanged = false;
    NoteList ins = getInEdgesSet(label);
    if (ins != null) {
      inChanged = ins.remove(edge.getId());
    }
    if (inChanged) {
      List<Edge> inObjs = getInEdgeCache(label);
      inObjs.remove(edge);
      getInDirtyKeySet().add(label);
    }

    boolean outChanged = false;
    NoteList outs = getOutEdgesSet(label);
    if (outs != null) {
      outChanged = outs.remove(edge.getId());
    }
    if (outChanged) {
      List<Edge> outObjs = getOutEdgeCache(label);
      outObjs.remove(edge);
      getOutDirtyKeySet().add(label);
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

    return outEdgeCache_;
  }

  @Override
  public int getInEdgeCount(final String label) {
    NoteList edgeIds = getInEdgesMap().get(label);
    if (edgeIds == null) {
      return getProperty("_COUNT" + DominoVertex.IN_PREFIX + label, Integer.class, false);
    } else {
      return edgeIds.size();
    }
  }
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

    }
  }

  @SuppressWarnings("unchecked")
  NoteList getInEdgesSet(final String label) {
    NoteList edgeIds = getInEdgesMap().get(label);
    if (edgeIds == null) {
      Object o = getProperty(DominoVertex.IN_PREFIX + label, java.util.Collection.class);
      if (o != null) {
        if (o instanceof NoteList) {
          edgeIds = ((NoteList) o);
        } else if (o instanceof java.util.Collection) {
          NoteList result = new NoteList(true);
          for (Object raw : (Collection) o) {
            if (raw instanceof String) {
              result.add(new NoteCoordinate(""/*TODO NTF This should be some default replid*/, (String) raw));
            } else {
              //TODO NTF
            }
          }
          edgeIds = result;
        } else {
          log_.log(Level.SEVERE, "ALERT! InEdges returned something other than a Collection " + o.getClass().getName()
              + ". We are clearing the values and rebuilding the edges.");
          edgeIds = new NoteList(true);
        }
      } else {
        edgeIds = new NoteList(true);
      }
      Map map = getInEdgesMap();
      map.put(label, edgeIds);
    }
    return edgeIds;
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

    return edgeIds;
  }

  @Override
  public int getOutEdgeCount(final String label) {
    NoteList edgeIds = getOutEdgesMap().get(label);
    if (edgeIds == null) {
      return getProperty("_COUNT" + DominoVertex.OUT_PREFIX + label, Integer.class, false);
    } else {
      return edgeIds.size();
    }
  }
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

      return edgeIds.size();
    }
  }

  NoteList getOutEdgesSet(final String label) {
    NoteList edgeIds = getOutEdgesMap().get(label);
    if (edgeIds == null) {
      Object o = getProperty(DominoVertex.OUT_PREFIX + label, java.util.Collection.class);
      if (o != null) {
        if (o instanceof NoteList) {
          edgeIds = ((NoteList) o);
        } else if (o instanceof java.util.Collection) {
          NoteList result = new NoteList(true);
          for (Object raw : (Collection) o) {
            if (raw instanceof String) {
              result.add(new NoteCoordinate(""/*TODO NTF This should be some default replid*/, (String) raw));
            } else {
              //TODO NTF
            }
          }
          edgeIds = result;
        } else {
          log_.log(Level.SEVERE, "ALERT! OutEdges returned something other than a Collection " + o.getClass().getName()
              + ". We are clearing the values and rebuilding the edges.");
          edgeIds = new NoteList(true);
        }
      } else {
        edgeIds = new NoteList(true);
      }
      Map map = getOutEdgesMap();
      map.put(label, edgeIds);
    }
    return edgeIds;
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

    FastSet<String> inDirtySet = getInDirtyKeySet();
    if (!inDirtySet.isEmpty()) {
      Iterator<String> it = inDirtySet.iterator();
      while (it.hasNext()) {
        String key = it.next();
        NoteList edgeIds = inMap.get(key);
        if (edgeIds != null) {
          setProperty(DominoVertex.IN_PREFIX + key, edgeIds);
          setProperty("_COUNT" + DominoVertex.IN_PREFIX + key, edgeIds.size());
          result = true;
        }
        it.remove();
      }
    }

    Map<String, NoteList> outMap = getOutEdgesMap();
    FastSet<String> outDirtySet = getOutDirtyKeySet();
    if (!outDirtySet.isEmpty()) {
      Iterator<String> it = outDirtySet.iterator();
      while (it.hasNext()) {
        String key = it.next();
        NoteList edgeIds = outMap.get(key);
        if (edgeIds != null) {
          setProperty(DominoVertex.OUT_PREFIX + key, edgeIds);
          setProperty("_COUNT" + DominoVertex.OUT_PREFIX + key, edgeIds.size());
          result = true;
        }
        it.remove();
      }
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

      }
    } else if (labels.length == 1) {
      String label = labels[0];
      result = inCache.get(label);
      if (result == null) {
        NoteList edgeIds = getInEdgesSet(label);
        FastTable<Edge> edges = getParent().getEdgesFromIds(edgeIds);
        if (edges != null) {
          result = edges.atomic();
        }
        inCache.put(label, result);
View Full Code Here

Examples of org.openntf.domino.big.impl.NoteList

      if (label == null) {
        return getOutEdgeObjects().unmodifiable();
      }
      result = outCache.get(label);
      if (result == null) {
        NoteList edgeIds = getOutEdgesSet(label);
        FastTable<Edge> edges = getParent().getEdgesFromIds(edgeIds);
        if (edges != null) {
          result = edges.atomic();
        }
        outCache.put(label, result);
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.