register Event

@Modifying(clearAutomatically = true )
@Query(value = "INSERT INTO " + SERVICE_EVENTS_KEY + " (" + IDENTIFIER_KEY + "," + TYPE_KEY + "," + EVENT_DATE_KEY + "," + SERVICE_IDENTIFIER_KEY + ") VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + TYPE_KEY + "," + ":" + EVENT_DATE_KEY + "," + ":" + SERVICE_IDENTIFIER_KEY + ")", nativeQuery = true )
abstract fun registerEvent(@Param(value = "id") eventId: String, @Param(value = "type") type: String, @Param(value = "event_date") eventDate: Long, @Param(value = "service_id") serviceId: String)

Query used to register a new event

Parameters

eventId

The identifier of the event

type

The type of the event

eventDate

The date when the event occurred

serviceId

The identifier of the service owner of the event


@Modifying(clearAutomatically = true )
@Query(value = "INSERT INTO " + SERVICE_EVENTS_KEY + " (" + IDENTIFIER_KEY + "," + TYPE_KEY + "," + EVENT_DATE_KEY + "," + EXTRA_KEY + "," + SERVICE_IDENTIFIER_KEY + ") VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + TYPE_KEY + "," + ":" + EVENT_DATE_KEY + "," + ":" + EXTRA_KEY + "," + ":" + SERVICE_IDENTIFIER_KEY + ")", nativeQuery = true )
abstract fun registerEvent(@Param(value = "id") eventId: String, @Param(value = "type") type: String, @Param(value = "event_date") eventDate: Long, @Param(value = "extra") extra: String, @Param(value = "service_id") serviceId: String)

Query used to register a new event

Parameters

eventId

The identifier of the event

type

The type of the event

eventDate

The date when the event occurred

extra

The extra information related to the event

serviceId

The identifier of the service owner of the event