|
||||||||||
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.MergeView
public final class MergeView
The merge view works together with a group view that splits the data in a stream to multiple subviews, based on a key index. Every group view requires a merge view to merge the many subviews back into a single view. Typically the last view in a chain containing a group view is a merge view. The merge view has no other responsibility then becoming the single last instance in the chain to which external listeners for updates can be attached to receive updates for the many subviews that have this merge view as common child views. The parent view of this view is generally the AddPropertyValueView that adds the grouped-by information back into the data.
Field Summary |
---|
Fields inherited from class net.esper.view.ViewSupport |
---|
parent |
Constructor Summary | |
---|---|
MergeView()
Default constructor - required by all views to adhere to the Java bean specification. |
|
MergeView(String[] groupFieldNames,
EventType resultEventType)
Constructor. |
Method Summary | |
---|---|
void |
addParentView(AddPropertyValueView parentView)
Add a parent data merge view. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
String[] |
getGroupFieldNames()
Returns the field name that contains the values to group by. |
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)
Sets event type - required for successful view copy. |
void |
setGroupFieldNames(String[] groupFieldNames)
Sets the field name that contains the values to group by. |
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, setParent, shallowCopyView, updateChildren, updateChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MergeView()
public MergeView(String[] groupFieldNames, EventType resultEventType)
groupFieldNames
- is the fields from which to pull the value to group byresultEventType
- is passed by the factory as the factory adds the merged fields to an event typeMethod Detail |
---|
public final String[] getGroupFieldNames()
public ViewServiceContext getViewServiceContext()
ContextAwareView
getViewServiceContext
in interface ContextAwareView
public void setViewServiceContext(ViewServiceContext viewServiceContext)
ContextAwareView
setViewServiceContext
in interface ContextAwareView
viewServiceContext
- with service handlespublic final void setGroupFieldNames(String[] groupFieldNames)
groupFieldNames
- is the field names providing group key valuespublic void setEventType(EventType eventType)
eventType
- is the event typepublic final void addParentView(AddPropertyValueView parentView)
parentView
- is the parent data merge view to addpublic final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public 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 Iterator<EventBean> iterator()
EventCollection
iterator
in interface Iterable<EventBean>
iterator
in interface EventCollection
public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |