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 void Visit(object obj) { IFieldIndexKey key = (IFieldIndexKey)obj; userVisitor.Visit(((IIndexableTypeHandler)this._enclosing.GetHandler()).IndexEntryToObject (context, key.Value())); }
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())); }
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 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 void Visit(object obj) { IFieldIndexKey fik = (IFieldIndexKey)obj; expectingVisitor.Visit(fik.Value()); }