2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.persistence.jdbc.internal.dto;
15 import java.util.Date;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.core.persistence.PersistenceItemInfo;
22 * Represents the item info for openHAB.
24 * @author Christoph Weitkamp - Initial contribution
27 public class JdbcPersistenceItemInfo implements PersistenceItemInfo {
29 private final String name;
30 private final @Nullable Integer count;
31 private final @Nullable Date earliest;
32 private final @Nullable Date latest;
34 public JdbcPersistenceItemInfo(String name) {
35 this(name, null, null, null);
38 public JdbcPersistenceItemInfo(String name, @Nullable Integer count, @Nullable Date earliest,
39 @Nullable Date latest) {
42 this.earliest = earliest;
47 public String getName() {
52 public @Nullable Integer getCount() {
57 public @Nullable Date getEarliest() {
62 public @Nullable Date getLatest() {