public static void Traverse(IIndexedNode node, IIntVisitor visitor) { IEnumerator i = node.GetEnumerator(); while (i.MoveNext()) { IFieldIndexKey composite = (IFieldIndexKey)i.Current; visitor.Visit(composite.ParentID()); } }
public static TreeInt AddToTree(TreeInt tree, IIndexedNode node) { IEnumerator i = node.GetEnumerator(); while (i.MoveNext()) { IFieldIndexKey composite = (IFieldIndexKey)i.Current; tree = (TreeInt)((TreeInt)Tree.Add(tree, new TreeInt(composite.ParentID()))); } return(tree); }
public virtual IPreparedComparison PrepareComparison(IContext context, object fieldIndexKey ) { IFieldIndexKey source = (IFieldIndexKey)fieldIndexKey; IPreparedComparison preparedValueComparison = _valueHandler.PrepareComparison(context , source.Value()); IPreparedComparison preparedParentIdComparison = _parentIdHandler.NewPrepareCompare (source.ParentID()); return(new _IPreparedComparison_67(preparedValueComparison, preparedParentIdComparison )); }
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object obj) { IFieldIndexKey composite = (IFieldIndexKey)obj; int parentID = composite.ParentID(); object value = composite.Value(); if (value == null) { parentID = -parentID; } _parentIdHandler.Write(parentID, writer); _valueHandler.WriteIndexEntry(context, writer, composite.Value()); }
public virtual IPreparedComparison PrepareComparison(IContext context, object fieldIndexKey ) { if (fieldIndexKey == null) { fieldIndexKey = new FieldIndexKeyImpl(int.MaxValue, null); } IFieldIndexKey source = (IFieldIndexKey)fieldIndexKey; IPreparedComparison preparedValueComparison = _valueHandler.PrepareComparison(context , source.Value()); IPreparedComparison preparedParentIdComparison = _parentIdHandler.NewPrepareCompare (source.ParentID()); return(new _IPreparedComparison_65(preparedValueComparison, preparedParentIdComparison )); }
public int CompareTo(object obj) { IFieldIndexKey target = (IFieldIndexKey)obj; try { int delegateResult = preparedValueComparison.CompareTo(target.Value()); if (delegateResult != 0) { return(delegateResult); } } catch (IllegalComparisonException) { } // can happen, is expected return(preparedParentIdComparison.CompareTo(target.ParentID())); }
protected override IEnumerator NextIterator(object current) { IFieldIndexKey key = (IFieldIndexKey)current; return(_path.Search(key.ParentID()).Keys()); }
protected override object Map(object current) { IFieldIndexKey composite = (IFieldIndexKey)current; return(composite.ParentID()); }
public HardObjectReference GetHardObjectReferenceBySignature(Transaction transaction , long longPart, byte[] signature) { IBTreeRange range = Search(transaction, longPart); IEnumerator keys = range.Keys(); while (keys.MoveNext()) { IFieldIndexKey current = (IFieldIndexKey)keys.Current; HardObjectReference hardRef = GetHardObjectReferenceById(transaction, current.ParentID (), signature); if (null != hardRef) { return(hardRef); } } return(HardObjectReference.Invalid); }