Exemple #1
0
        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()));
            }
Exemple #3
0
            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()));
            }
Exemple #4
0
        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
                                               ));
        }
Exemple #6
0
            public void Visit(object obj)
            {
                IFieldIndexKey fik = (IFieldIndexKey)obj;

                expectingVisitor.Visit(fik.Value());
            }