Skip to content

Package: EventStoreService

EventStoreService

Coverage

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