|
||||||||||
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 groupFieldName)
Constructor. |
|
MergeView(String[] groupFieldNames)
Constructor. |
Method Summary | |
---|---|
void |
addParentView(AddPropertyValueView parentView)
Add a parent data merge view. |
String |
attachesTo(Viewable parentView)
Return null if the view will accept being attached to a particular object. |
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. |
Class[] |
getGroupFieldTypes()
Returns types of fields used in the 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 |
setGroupFieldType(Class[] groupFieldTypes)
Sets types of fields used in the group-by. |
void |
setParentAware(List<View> parentViews)
Called to indicate the parent views. |
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 groupFieldName)
groupFieldName
- is the field from which to pull the value to group bypublic MergeView(String[] groupFieldNames)
groupFieldNames
- is the fields from which to pull the value to group byMethod 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 Class[] getGroupFieldTypes()
public void setGroupFieldType(Class[] groupFieldTypes)
groupFieldTypes
- - types for group-by fieldspublic final void addParentView(AddPropertyValueView parentView)
parentView
- is the parent data merge view to addpublic final String attachesTo(Viewable parentView)
View
attachesTo
in interface View
parentView
- is the potential parent for this view
public void setParentAware(List<View> parentViews)
ParentAwareView
setParentAware
in interface ParentAwareView
parentViews
- is a list of parent views in top-down orderpublic 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 |