]> git.basschouten.com Git - openhab-addons.git/blob
4175ed329bc791d26107305bdde1022ce4082d60
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.persistence.influxdb.internal;
14
15 import java.util.Date;
16 import java.util.Map;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.openhab.core.persistence.PersistenceItemInfo;
21
22 /**
23  * Java bean used to return information about stored items
24  *
25  * @author Joan Pujol Espinar - Initial contribution
26  */
27 @NonNullByDefault
28 public class InfluxDBPersistentItemInfo implements PersistenceItemInfo {
29     private final String name;
30     private final Integer count;
31
32     public InfluxDBPersistentItemInfo(Map.Entry<String, Integer> itemInfo) {
33         this.name = itemInfo.getKey();
34         this.count = itemInfo.getValue();
35     }
36
37     @Override
38     public String getName() {
39         return name;
40     }
41
42     @Override
43     @Nullable
44     public Integer getCount() {
45         return count;
46     }
47
48     @Override
49     @Nullable
50     public Date getEarliest() {
51         return null;
52     }
53
54     @Override
55     @Nullable
56     public Date getLatest() {
57         return null;
58     }
59 }