/
EventStoreService.java
52 lines (47 loc) · 1.93 KB
/
EventStoreService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
* Copyright (c) 2016, 2020 Eurotech and/or its affiliates and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eurotech - initial API and implementation
*******************************************************************************/
package org.eclipse.kapua.commons.service.event.store.api;
import org.eclipse.kapua.KapuaException;
import org.eclipse.kapua.model.id.KapuaId;
import org.eclipse.kapua.model.query.KapuaQuery;
import org.eclipse.kapua.service.KapuaEntityService;
import org.eclipse.kapua.service.KapuaUpdatableEntityService;
/**
* KapuaEventService exposes APIs to manage KapuaEvent objects.<br>
* It includes APIs to create, update, find, list and delete KapuaEvents.<br>
* Instances of the KapuaEventService can be acquired through the ServiceLocator object.
*
* @since 1.0
*/
public interface EventStoreService extends KapuaEntityService<EventStoreRecord, EventStoreRecordCreator>,
KapuaUpdatableEntityService<EventStoreRecord> {
/**
* Finds the kapuaEvent by kapuaEvent identifiers
*
* @param id
* @return
* @throws KapuaException
*/
public EventStoreRecord find(KapuaId id)
throws KapuaException;
/**
* Returns the {@link EventStoreRecordListResult} with elements matching the provided query.
*
* @param query The {@link EventStoreRecordQuery} used to filter results.
* @return The {@link EventStoreRecordListResult} with elements matching the query parameter.
* @throws KapuaException
* @since 1.0.0
*/
@Override
public EventStoreRecordListResult query(KapuaQuery<EventStoreRecord> query)
throws KapuaException;
}