Skip to content

Package: Storable

Storable

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.service.storable.model;
14:
15: import org.eclipse.kapua.KapuaSerializable;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.model.id.KapuaIdAdapter;
18:
19: import javax.xml.bind.annotation.XmlElement;
20: import javax.xml.bind.annotation.XmlType;
21: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
22:
23: /**
24: * {@link Storable} definition.
25: * <p>
26: * It is the base {@code interface} for all {@link Object}s that are {@link Storable}
27: *
28: * @since 1.0.0
29: */
30: @XmlType(propOrder = {"scopeId"})
31: public interface Storable extends KapuaSerializable {
32:
33: /**
34: * Gets the scope {@link KapuaId}.
35: *
36: * @return The scope {@link KapuaId}.
37: * @since 1.0.0
38: */
39: @XmlElement(name = "scopeId")
40: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
41: KapuaId getScopeId();
42:
43: /**
44: * Sets the scope {@link KapuaId}.
45: *
46: * @param scopeId The scope {@link KapuaId}.
47: * @since 1.3.0
48: */
49: void setScopeId(KapuaId scopeId);
50:
51: }