com.apama.utils
Event MultipleParamsDataView


A helper event to create a DataView with columns matching a ParamsSchema event and each row representing a Params events which matches the ParamsSchema.
Since:
CMF 5.2.0
Version:
10.7
See Also:
com.apama.utils.Params - The Params event type this DataView can display.
com.apama.utils.ParamsSchema - The ParamsSchema event type this DataViews fields are extracted from.
com.apama.utils.MultipleParamsDataViewConsts - The Constants to use for configuration.

Action summary
 voidaddOrUpdate(com.apama.utils.Params params)

Add or Update a row in the DataView.
 voidclear()

Clear all items/rows from the DataView.
 voidcreate(context mainContext, com.apama.utils.Params config, com.apama.utils.ParamsSchema schema)

Create a new DataView where the Columns are set to the fields in the supplied ParamsSchema.
 voiddelete()

Unregister and delete the DataView.
 voidonSpawn()

Must be called after spawning to clear out its instance state and register the context with the ScenarioService.
 voidremove(com.apama.utils.Params params)

Removes a row from the DataView.
 
Action detail

addOrUpdate

void addOrUpdate(com.apama.utils.Params params)
Add or Update a row in the DataView.

Add or Update a row in the DataView, extracting the values from the supplied Params events according to the ParamSchema this MultipleParamsDataView was created with. The KEY_FIELDS config is used to identify if the row is unique and needs to be added, or a current row is updated.
Parameters:
params - The Params event to display
See Also:
com.apama.utils.Params - The Params event type this DataView can display.

clear

void clear()
Clear all items/rows from the DataView.

create() must have been called to initialise the DataView before calling clear().

create

void create(context mainContext, com.apama.utils.Params config, com.apama.utils.ParamsSchema schema)
Create a new DataView where the Columns are set to the fields in the supplied ParamsSchema.

Creates a new DataView named after the given NAME configuration and the Column names extracted from the supplied ParamsSchema events. New items/rows can be added using a Params events that conforms to the Schema. Any invalid types in the Schema will be changed to 'string'. Create can only be called once per MultipleParamsDataView until delete() is called. onSpawn() must be called after spawning to register the new context with the Scenario Service.
Parameters:
mainContext - The main context
config - The configuration for this DataView
schema - The ParamsSchema event to extract the Columns from
See Also:
com.apama.utils.Params - The Params event type this DataView can display.
com.apama.utils.ParamsSchema - The ParamsSchema event type this DataViews fields are extracted from.

delete

void delete()
Unregister and delete the DataView.

create() must have been called to initialise the DataView before calling delete().

onSpawn

void onSpawn()
Must be called after spawning to clear out its instance state and register the context with the ScenarioService.

create() must have been called to initialise the DataView before calling onSpawn().

remove

void remove(com.apama.utils.Params params)
Removes a row from the DataView.

The KEY_FIELDS config is used to identify the unique row to remove.
Parameters:
params - The Params event to remove
See Also:
com.apama.utils.Params - The Params event type this DataView can display.