Beispiel #1
0
        /// <summary>Returns the set of events that have the same property value as the given event. </summary>
        /// <param name="keys">to compare against</param>
        /// <returns>set of events with property value, or null if none found (never returns zero-sized set)</returns>
        public override ISet <EventBean> Lookup(Object[] keys)
        {
            for (int i = 0; i < keys.Length; i++)
            {
                var coercionType = CoercionTypes[i];
                var key          = keys[i];

                if ((key != null) && (key.GetType() != coercionType))
                {
                    if (key.IsNumber())
                    {
                        key     = CoercerFactory.CoerceBoxed(key, CoercionTypes[i]);
                        keys[i] = key;
                    }
                }
            }

            return(PropertyIndex.Get(new MultiKeyUntyped(keys)));
        }
 /// <summary>Returns the set of events that have the same property value as the given event. </summary>
 /// <returns>set of events with property value, or null if none found (never returns zero-sized set)</returns>
 public override ISet <EventBean> Lookup(Object key)
 {
     key = EventBeanUtility.Coerce(key, _coercionType);
     return(PropertyIndex.Get(key));
 }