Ejemplo n.º 1
0
 public object Get(EventBean eventBean)
 {
     var riv = (RevisionEventBeanDeclared) eventBean;
     var bean = riv.LastBaseEvent;
     if (bean == null) return null;
     return _fullGetter.Get(bean);
 }
Ejemplo n.º 2
0
 public object Get(EventBean theEvent)
 {
     if (!(theEvent is DecoratingEventBean))
         throw new PropertyAccessException("Mismatched property getter to EventBean type");
     var wrapperEvent = (DecoratingEventBean) theEvent;
     var map = wrapperEvent.DecoratingProperties;
     return _mapGetter.Get(_eventAdapterService.AdapterForTypedMap(map, _underlyingMapType));
 }
Ejemplo n.º 3
0
        private ICollection<T> EvaluateInternal<T>(EventBean @event)
        {
            var result = getter.Get(@event);
            if (result == null) {
                return null;
            }

            if (!result.GetType().IsGenericCollection()) {
                Log.Warn(
                    "Expected collection-type input from property '" +
                    propertyName +
                    "' but received " +
                    result.GetType());
                return null;
            }

            return getter.Get(@event).Unwrap<T>();
        }
        public object Get(EventBean obj)
        {
            var result = _revisionGetter.Get(obj);
            if (result == null) return result;

            // Object within the map
            var theEvent = _eventAdapterService.AdapterForObject(result);
            return _nestedGetter.Get(theEvent);
        }
Ejemplo n.º 5
0
 public object Evaluate(
     EventBean[] eventsPerStream,
     bool isNewData,
     ExprEvaluatorContext context)
 {
     var props = context.ContextProperties;
     var result = props != null ? getter.Get(props) : null;
     return result;
 }
Ejemplo n.º 6
0
 public object Get(EventBean theEvent)
 {
     if (!(theEvent is DecoratingEventBean))
         throw new PropertyAccessException("Mismatched property getter to EventBean type");
     var wrapperEvent = (DecoratingEventBean) theEvent;
     var wrappedEvent = wrapperEvent.UnderlyingEvent;
     if (wrappedEvent == null) return null;
     return _underlyingGetter.Get(wrappedEvent);
 }
        public object GetFilterValue(
            MatchedEventMap matchedEvents,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            if (exprEvaluatorContext.ContextProperties == null) {
                return null;
            }

            return _getter.Get(exprEvaluatorContext.ContextProperties);
        }
Ejemplo n.º 8
0
        public object GetMap(IDictionary<string, object> map)
        {
            // If the map does not contain the key, this is allowed and represented as null
            var value = map.Get(_propertyMap);

            if (value == null) return null;

            // Object within the map
            var theEvent = (EventBean) value;
            return _eventBeanEntryGetter.Get(theEvent);
        }
Ejemplo n.º 9
0
        public object Evaluate(
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            var @event = eventsPerStream[_streamNum];
            if (@event == null) {
                return null;
            }

            return _propertyGetter.Get(@event);
        }
Ejemplo n.º 10
0
        public object Evaluate(
            object target,
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            if (!(target is EventBean)) {
                return null;
            }

            return getter.Get((EventBean) target);
        }
Ejemplo n.º 11
0
        public object Evaluate(
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext context)
        {
            var @event = eventsPerStream[streamId];
            if (@event == null) {
                return null;
            }

            return getter.Get(@event);
        }
Ejemplo n.º 12
0
        public double? GetFilterValue(
            MatchedEventMap matchedEvents,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            if (exprEvaluatorContext.ContextProperties == null) {
                return null;
            }

            var @object = _getter.Get(exprEvaluatorContext.ContextProperties);

            return @object?.AsDouble();
        }
        public object GetObjectArray(object[] array)
        {
            // If the map does not contain the key, this is allowed and represented as null
            var value = array[propertyIndex];

            if (value == null) {
                return null;
            }

            // Object within the map
            var theEvent = (EventBean) value;
            return eventBeanEntryGetter.Get(theEvent);
        }
            public object Evaluate(
                EventBean[] eventsPerStream,
                bool isNewData,
                ExprEvaluatorContext exprEvaluatorContext)
            {
                var theEvent = eventsPerStream[0];

                if (theEvent != null)
                {
                    return(getter.Get(theEvent));
                }

                return(null);
            }
Ejemplo n.º 15
0
        public object GetFilterValue(
            MatchedEventMap matchedEvents,
            ExprEvaluatorContext evaluatorContext)
        {
            if (evaluatorContext.ContextProperties == null) {
                return null;
            }

            var result = _getter.Get(evaluatorContext.ContextProperties);

            if (_numberCoercer == null) {
                return result;
            }

            return _numberCoercer.CoerceBoxed(result);
        }
Ejemplo n.º 16
0
        public object Evaluate(
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext context)
        {
            var theEvent = eventsPerStream[streamId];
            if (theEvent == null) {
                return null;
            }

            var @event = getterFragment.GetFragment(theEvent);
            if (!(@event is EventBean)) {
                return null;
            }

            return getterTimestamp.Get((EventBean) @event);
        }
        public object Evaluate(
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            EventBean @event = eventsPerStream[_streamNum];
            if (@event == null) {
                return null;
            }

            object result = _getter.Get(@event);
            if (result != null && result.GetType().IsArray) {
                return Arrays.AsList((object[]) result);
            }

            return null;
        }
Ejemplo n.º 18
0
        private ICollection<object> EvaluateGetInternal(EventBean @event)
        {
            var value = getter.Get(@event);
            if (value == null) {
                return null;
            }

            if (!value.GetType().IsArray) {
                Log.Warn(
                    "Expected array-type input from property '" + propertyName + "' but received " + value.GetType());
                return null;
            }

            if (ComponentTypeCollection.IsValueType) {
                return value.Unwrap<object>(); // new ArrayWrappingCollection(value);
            }

            return value.Unwrap<object>();
        }
Ejemplo n.º 19
0
        public object Evaluate(object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext)
        {
            if (!(target is EventBean eventBean))
            {
                return(null);
            }
            var array = _getter.Get(eventBean) as Array;

            if (array == null)
            {
                return(null);
            }

            var index = _indexExpression.Forge.ExprEvaluator.Evaluate(eventsPerStream, isNewData, exprEvaluatorContext).AsBoxedInt32();

            if (index == null)
            {
                return(null);
            }

            return(array.GetValue(index.Value));
        }
Ejemplo n.º 20
0
 public object Get(EventBean eventBean)
 {
     return GetXPathNodeListWCheck(getter.Get(eventBean), index);
 }
 public object Get(EventBean eventBean)
 {
     return(GetXPathNodeListWCheck(_getter.Get(eventBean), _index));
 }
Ejemplo n.º 22
0
 private FlexCollection EvaluateGetInternal(EventBean @event)
 {
     return ConvertToCollection(_propertyName, _getter.Get(@event));
 }