Adaptations due to Vaadin 8 merge

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
Ammar Bikic
2020-08-31 21:33:32 +02:00
parent a6404fdb83
commit 8e90ffd95e
25 changed files with 51 additions and 33 deletions

View File

@@ -97,7 +97,7 @@ public interface ArtifactManagement {
void delete(long id);
/**
* Searches for {@link Artifact} with given {@link Long}.
* Searches for {@link Artifact} with given {@link Identifiable}.
*
* @param id
* to search for

View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) 2020 Bosch.IO GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository;
import java.io.Serializable;
public interface Identifiable<T extends Serializable> {
T getId();
}

View File

@@ -8,9 +8,10 @@
*/
package org.eclipse.hawkbit.repository.model;
import org.eclipse.hawkbit.repository.Identifiable;
import java.io.Serializable;
import org.springframework.hateoas.Identifiable;
/**
* Use to display software modules for the selected distribution.

View File

@@ -8,6 +8,8 @@
*/
package org.eclipse.hawkbit.repository.model;
import org.eclipse.hawkbit.repository.Identifiable;
import java.io.Serializable;
import java.util.concurrent.TimeUnit;
@@ -15,17 +17,12 @@ import java.util.concurrent.TimeUnit;
* Core information of all entities.
*
*/
public interface BaseEntity extends Serializable {
public interface BaseEntity extends Serializable, Identifiable<Long> {
static Long getIdOrNull(final BaseEntity entity) {
return entity == null ? null : entity.getId();
}
/**
* @return the unique identifier of the {@link BaseEntity}.
*/
Long getId();
/**
* @return time in {@link TimeUnit#MILLISECONDS} when the {@link BaseEntity}
* was created.

View File

@@ -8,8 +8,8 @@
*/
package org.eclipse.hawkbit.repository.model;
import org.eclipse.hawkbit.repository.Identifiable;
import org.eclipse.hawkbit.repository.model.Action.Status;
import org.springframework.hateoas.Identifiable;
/**
*