|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.view.ViewSupport
net.esper.view.std.AddPropertyValueView
public final class AddPropertyValueView
This view simply adds a property to the events posted to it. This is useful for the group-merge views.
Field Summary |
---|
Fields inherited from class net.esper.view.ViewSupport |
---|
parent |
Constructor Summary | |
---|---|
AddPropertyValueView()
Empty constructor - required for Java bean. |
|
AddPropertyValueView(String[] fieldNames,
Object[] mergeValues,
EventType mergedResultEventType)
Constructor. |
Method Summary | |
---|---|
protected static EventBean |
addProperty(EventBean originalEvent,
String[] propertyNames,
Object[] propertyValues,
EventType targetEventType,
EventAdapterService eventAdapterService)
Add a property to the event passed in. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
String[] |
getPropertyNames()
Returns field name for which to set the merge value for. |
Object[] |
getPropertyValues()
Returns the value to set for the field. |
ViewServiceContext |
getViewServiceContext()
Returns the context instances used by the view. |
Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection. |
void |
setEventType(EventType eventType)
|
void |
setParent(Viewable parent)
Called when the View is added to a Viewable object. |
void |
setPropertyNames(String[] propertyNames)
Sets the field name for which to set the merge value for. |
void |
setPropertyValues(Object[] propertyValue)
Sets the value for the field to merge into the events coming into this view. |
void |
setViewServiceContext(ViewServiceContext viewServiceContext)
Set the services context containing service handles. |
String |
toString()
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent. |
Methods inherited from class net.esper.view.ViewSupport |
---|
addView, dumpChildViews, dumpUpdateParams, findDescendent, getParent, getViews, hasViews, removeView, shallowCopyView, updateChildren, updateChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AddPropertyValueView()
public AddPropertyValueView(String[] fieldNames, Object[] mergeValues, EventType mergedResultEventType)
fieldNames
- is the name of the field that is added to any events received by this view.mergeValues
- is the values of the field that is added to any events received by this view.mergedResultEventType
- is the event type that the merge view reports to it's child viewsMethod Detail |
---|
public ViewServiceContext getViewServiceContext()
ContextAwareView
getViewServiceContext
in interface ContextAwareView
public void setViewServiceContext(ViewServiceContext viewServiceContext)
ContextAwareView
setViewServiceContext
in interface ContextAwareView
viewServiceContext
- with service handlespublic void setParent(Viewable parent)
View
setParent
in interface View
setParent
in class ViewSupport
parent
- is the parent that this view is a child ofpublic final String[] getPropertyNames()
public final void setPropertyNames(String[] propertyNames)
propertyNames
- to setpublic final Object[] getPropertyValues()
public final void setPropertyValues(Object[] propertyValue)
propertyValue
- is the value to merge inpublic final void update(EventBean[] newData, EventBean[] oldData)
View
update
in interface View
newData
- is the new data that has been added to the parent viewoldData
- is the old data that has been removed from the parent viewpublic final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public void setEventType(EventType eventType)
public final Iterator<EventBean> iterator()
EventCollection
iterator
in interface Iterable<EventBean>
iterator
in interface EventCollection
protected static EventBean addProperty(EventBean originalEvent, String[] propertyNames, Object[] propertyValues, EventType targetEventType, EventAdapterService eventAdapterService)
originalEvent
- - event to add property topropertyNames
- - names of properties to addpropertyValues
- - value of properties to addtargetEventType
- - new event typeeventAdapterService
- - service for generating events and handling event types
public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |