Package: DeviceConnectionOptionFactoryImpl
DeviceConnectionOptionFactoryImpl
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DeviceConnectionOptionFactoryImpl() |
|
|
|
|
|
||||||||||||||||||||
clone(DeviceConnectionOption) |
|
|
|
|
|
||||||||||||||||||||
newCreator(KapuaId) |
|
|
|
|
|
||||||||||||||||||||
newEntity(KapuaId) |
|
|
|
|
|
||||||||||||||||||||
newListResult() |
|
|
|
|
|
||||||||||||||||||||
newQuery(KapuaId) |
|
|
|
|
|
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.device.registry.connection.option.internal;
14:
15: import org.eclipse.kapua.KapuaEntityCloneException;
16: import org.eclipse.kapua.locator.KapuaProvider;
17: import org.eclipse.kapua.model.id.KapuaId;
18: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOption;
19: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOptionCreator;
20: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOptionFactory;
21: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOptionListResult;
22: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOptionQuery;
23:
24: /**
25: * {@link DeviceConnectionOptionFactory} implementation.
26: *
27: * @since 1.0.0
28: */
29: @KapuaProvider
30: public class DeviceConnectionOptionFactoryImpl implements DeviceConnectionOptionFactory {
31:
32: @Override
33: public DeviceConnectionOptionCreator newCreator(KapuaId scopeId) {
34: return new DeviceConnectionOptionCreatorImpl(scopeId);
35: }
36:
37: @Override
38: public DeviceConnectionOptionQuery newQuery(KapuaId scopeId) {
39: return new DeviceConnectionOptionQueryImpl(scopeId);
40: }
41:
42: @Override
43: public DeviceConnectionOption newEntity(KapuaId scopeId) {
44: return new DeviceConnectionOptionImpl(scopeId);
45: }
46:
47: @Override
48: public DeviceConnectionOptionListResult newListResult() {
49: return new DeviceConnectionOptionListResultImpl();
50: }
51:
52: @Override
53: public DeviceConnectionOption clone(DeviceConnectionOption deviceConnectionOption) {
54: try {
55: return new DeviceConnectionOptionImpl(deviceConnectionOption);
56: } catch (Exception e) {
57: throw new KapuaEntityCloneException(e, DeviceConnectionOption.TYPE, deviceConnectionOption);
58: }
59: }
60: }