From 85deebdf336c2190a3774189cdf3ce8ece69ca38 Mon Sep 17 00:00:00 2001 From: jan-kir-wwu Date: Wed, 13 Dec 2023 19:59:57 +0100 Subject: [PATCH] feat: more models --- .../erathor/api/controller/ExecutionControllerAPI.java | 2 +- .../org/erathor/api/controller/ModelControllerAPI.java | 6 ++++-- src/main/java/org/erathor/api/model/ExecutionAPI.java | 4 ++-- src/main/java/org/erathor/api/model/ModelAPI.java | 10 ++++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/main/java/org/erathor/api/model/ModelAPI.java diff --git a/src/main/java/org/erathor/api/controller/ExecutionControllerAPI.java b/src/main/java/org/erathor/api/controller/ExecutionControllerAPI.java index 6def62e..bbc9442 100644 --- a/src/main/java/org/erathor/api/controller/ExecutionControllerAPI.java +++ b/src/main/java/org/erathor/api/controller/ExecutionControllerAPI.java @@ -2,6 +2,6 @@ import org.erathor.api.model.ExecutionAPI; -public interface ExecutionControllerAPI extends ModelControllerAPI { +public interface ExecutionControllerAPI extends ModelControllerAPI { } diff --git a/src/main/java/org/erathor/api/controller/ModelControllerAPI.java b/src/main/java/org/erathor/api/controller/ModelControllerAPI.java index fa6aaa8..5f4abad 100644 --- a/src/main/java/org/erathor/api/controller/ModelControllerAPI.java +++ b/src/main/java/org/erathor/api/controller/ModelControllerAPI.java @@ -3,9 +3,11 @@ import java.util.List; import java.util.Optional; -public interface ModelControllerAPI { +import org.erathor.api.model.ModelAPI; - public Optional read(ID id); +public interface ModelControllerAPI { + + public Optional read(Integer id); public M create(M model); diff --git a/src/main/java/org/erathor/api/model/ExecutionAPI.java b/src/main/java/org/erathor/api/model/ExecutionAPI.java index 60baf36..e16ae77 100644 --- a/src/main/java/org/erathor/api/model/ExecutionAPI.java +++ b/src/main/java/org/erathor/api/model/ExecutionAPI.java @@ -1,5 +1,5 @@ package org.erathor.api.model; -public interface ExecutionAPI { - +public interface ExecutionAPI extends ModelAPI { + } diff --git a/src/main/java/org/erathor/api/model/ModelAPI.java b/src/main/java/org/erathor/api/model/ModelAPI.java new file mode 100644 index 0000000..f5d83df --- /dev/null +++ b/src/main/java/org/erathor/api/model/ModelAPI.java @@ -0,0 +1,10 @@ +package org.erathor.api.model; + +public interface ModelAPI { + + public Integer getId(); + + public void setId(Integer id); + + public void updatedValues(); +}