Event
Represents a single event
Static Method Summary
| Static Public Methods | ||
| public static |
Returns a new instance of Event from protobuf result |
|
Constructor Summary
| Public Constructor | ||
| public |
Creates an instance of Event. |
|
Member Summary
| Public Members | ||
| public set |
Setter for event correlationId |
|
| public get |
Getter for event correlationId |
|
| public get |
Getter for event data |
|
| public set |
Sets data |
|
| public |
eventNumber: Long | number | null event number in stream |
|
| public set |
Setter for event id |
|
| public get |
Getter for event id |
|
| public get |
Getter for event metadata |
|
| public set |
Setter for event metadata |
|
| public set |
Setter for name |
|
| public get |
Getter for event name |
|
| public |
raw buffer representation of data |
|
| public |
raw buffer representation of metadata |
|
| public |
streamId |
|
| Protected Members | ||
| protected |
flag if data is type of json |
|
| protected |
unique event uuid4 |
|
| protected |
event type = name of event |
|
| protected |
indicates if event was written to eventstore |
|
| protected |
isResolved: * indicates if its an event or a link which must be resolved |
|
| protected |
flag if metadata is type of json |
|
| protected |
events correlation uuid4 |
|
| protected |
objectCreated: number | Long | null creation date as timestamp |
|
| protected |
objectCreatedEpoch: number | Long | null creation date as timestamp |
|
| protected |
objectData: SOMEUNKNOWN | null js object representation of data |
|
| protected |
objectMetadata: SOMEUNKNOWN | null js object representation of metadata |
|
Method Summary
| Public Methods | ||
| public |
causesEvent(eventType: , data: , metadata: ): Event Returns a new new instance of Event with correlation id set to currents events correlation id or id |
|
| public |
freeze(): void Freezes event instance. |
|
| public |
Returns true if event is a link and not a full resolved event |
|
| public |
Returns true if event is not stored at eventstore and false if event was written to eventstore |
|
| public |
toRaw(): SOMEUNKNOWN Returns protobuf representation of this event |
|
| Protected Methods | ||
| protected |
throwIfNotNewEvent(fieldName: ): void Helper function to throw while changing an event which is already stored in eventstore |
|
Static Public Methods
Public Constructors
Public Members
Protected Members
Public Methods
public causesEvent(eventType: , data: , metadata: ): Event source
Returns a new new instance of Event with correlation id set to currents events correlation id or id
Params:
| Name | Type | Attribute | Description |
| eventType | |||
| data | |||
| metadata |
public freeze(): void source
Freezes event instance. Done when this event is already stored at eventstore.
public isNew(): boolean source
Returns true if event is not stored at eventstore and false if event was written to eventstore
Protected Methods
protected throwIfNotNewEvent(fieldName: ): void source
Helper function to throw while changing an event which is already stored in eventstore
Params:
| Name | Type | Attribute | Description |
| fieldName |
