Class ObjectArrayNestedEntryPropertyGetterBase
- All Implemented Interfaces:
EventPropertyGetter
,EventPropertyValueGetter
,ObjectArrayEventPropertyGetter
,EventPropertyGetterSPI
,EventPropertyValueGetterForge
- Direct Known Subclasses:
ObjectArrayNestedEntryPropertyGetterArrayMap
,ObjectArrayNestedEntryPropertyGetterArrayObjectArray
,ObjectArrayNestedEntryPropertyGetterMap
,ObjectArrayNestedEntryPropertyGetterObjectArray
-
Field Summary
Modifier and TypeFieldDescriptionprotected final EventBeanTypedEventFactory
protected final EventType
protected final int
Fields inherited from interface com.espertech.esper.common.client.EventPropertyValueGetter
EPTYPE, EPTYPEARRAY
-
Constructor Summary
ConstructorDescriptionObjectArrayNestedEntryPropertyGetterBase
(int propertyIndex, EventType fragmentType, EventBeanTypedEventFactory eventBeanTypedEventFactory) Ctor. -
Method Summary
Modifier and TypeMethodDescriptioneventBeanExistsCodegen
(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) eventBeanFragmentCodegen
(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) eventBeanGetCodegen
(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) Return the value for the property in the event object specified when the instance was obtained.getFragment
(EventBean obj) getObjectArray
(Object[] array) Returns a property of an event.abstract Object
handleNestedValue
(Object value) abstract CodegenExpression
handleNestedValueCodegen
(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) abstract boolean
handleNestedValueExists
(Object value) abstract CodegenExpression
handleNestedValueExistsCodegen
(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) abstract Object
handleNestedValueFragment
(Object value) abstract CodegenExpression
handleNestedValueFragmentCodegen
(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) boolean
isExistsProperty
(EventBean eventBean) Returns true if the property exists, or false if the type does not have such a property.boolean
isObjectArrayExistsProperty
(Object[] array) Exists-function for properties in a object array-type event.underlyingExistsCodegen
(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) underlyingFragmentCodegen
(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) underlyingGetCodegen
(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
-
Field Details
-
propertyIndex
protected final int propertyIndex -
fragmentType
-
eventBeanTypedEventFactory
-
-
Constructor Details
-
ObjectArrayNestedEntryPropertyGetterBase
public ObjectArrayNestedEntryPropertyGetterBase(int propertyIndex, EventType fragmentType, EventBeanTypedEventFactory eventBeanTypedEventFactory) Ctor.- Parameters:
propertyIndex
- the property to look ateventBeanTypedEventFactory
- factory for event beans and event typesfragmentType
- type of the entry returned
-
-
Method Details
-
handleNestedValue
-
handleNestedValueExists
-
handleNestedValueFragment
-
handleNestedValueCodegen
public abstract CodegenExpression handleNestedValueCodegen(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) -
handleNestedValueExistsCodegen
public abstract CodegenExpression handleNestedValueExistsCodegen(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) -
handleNestedValueFragmentCodegen
public abstract CodegenExpression handleNestedValueFragmentCodegen(CodegenExpression refName, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) -
getObjectArray
Description copied from interface:ObjectArrayEventPropertyGetter
Returns a property of an event.- Specified by:
getObjectArray
in interfaceObjectArrayEventPropertyGetter
- Parameters:
array
- to interrogate- Returns:
- property value
- Throws:
PropertyAccessException
- for property access errors
-
isObjectArrayExistsProperty
Description copied from interface:ObjectArrayEventPropertyGetter
Exists-function for properties in a object array-type event.- Specified by:
isObjectArrayExistsProperty
in interfaceObjectArrayEventPropertyGetter
- Parameters:
array
- to interrogate- Returns:
- indicator
-
get
Description copied from interface:EventPropertyValueGetter
Return the value for the property in the event object specified when the instance was obtained. Useful for fast access to event properties. Throws a PropertyAccessException if the getter instance doesn't match the EventType it was obtained from, and to indicate other property access problems.- Specified by:
get
in interfaceEventPropertyValueGetter
- Parameters:
obj
- is the event to get the value of a property from- Returns:
- value of property in event
-
isExistsProperty
Description copied from interface:EventPropertyGetter
Returns true if the property exists, or false if the type does not have such a property.Useful for dynamic properties of the syntax "property?" and the dynamic nested/indexed/mapped versions. Dynamic nested properties follow the syntax "property?.nested" which is equivalent to "property?.nested?". If any of the properties in the path of a dynamic nested property return null, the dynamic nested property does not exists and the method returns false.
For non-dynamic properties, this method always returns true since a getter would not be available unless
- Specified by:
isExistsProperty
in interfaceEventPropertyGetter
- Parameters:
eventBean
- is the event to check if the dynamic property exists- Returns:
- indictor whether the property exists, always true for non-dynamic (default) properties
-
getFragment
Description copied from interface:EventPropertyGetter
ReturnsEventBean
or array ofEventBean
for a property name or property expression.For use with properties whose value is itself an event or whose value can be represented as an event by the underlying event representation.
The
EventType
of theEventBean
instance(s) returned by this method can be determined byEventType.getFragmentType(String)
. UseEventPropertyDescriptor
to obtain a list of properties that return fragments from an event type.Returns null if the property value is null or the property value cannot be represented as a fragment by the underlying representation.
- Specified by:
getFragment
in interfaceEventPropertyGetter
- Parameters:
obj
- is the event to get the fragment value of a property- Returns:
- the value of a property as an EventBean or array of EventBean
-
eventBeanGetCodegen
public CodegenExpression eventBeanGetCodegen(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
eventBeanGetCodegen
in interfaceEventPropertyValueGetterForge
-
eventBeanExistsCodegen
public CodegenExpression eventBeanExistsCodegen(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
eventBeanExistsCodegen
in interfaceEventPropertyGetterSPI
-
eventBeanFragmentCodegen
public CodegenExpression eventBeanFragmentCodegen(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
eventBeanFragmentCodegen
in interfaceEventPropertyGetterSPI
-
underlyingGetCodegen
public CodegenExpression underlyingGetCodegen(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
underlyingGetCodegen
in interfaceEventPropertyGetterSPI
-
underlyingExistsCodegen
public CodegenExpression underlyingExistsCodegen(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
underlyingExistsCodegen
in interfaceEventPropertyGetterSPI
-
underlyingFragmentCodegen
public CodegenExpression underlyingFragmentCodegen(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
underlyingFragmentCodegen
in interfaceEventPropertyGetterSPI
-