Skip to content

Commit

Permalink
feat: more models
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kir-wwu committed Dec 13, 2023
1 parent dceb40e commit 85deebd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

import org.erathor.api.model.ExecutionAPI;

public interface ExecutionControllerAPI extends ModelControllerAPI<ExecutionAPI, Integer> {
public interface ExecutionControllerAPI extends ModelControllerAPI<ExecutionAPI> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import java.util.List;
import java.util.Optional;

public interface ModelControllerAPI<M, ID> {
import org.erathor.api.model.ModelAPI;

public Optional<M> read(ID id);
public interface ModelControllerAPI<M extends ModelAPI> {

public Optional<M> read(Integer id);

public M create(M model);

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/erathor/api/model/ExecutionAPI.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.erathor.api.model;

public interface ExecutionAPI {
public interface ExecutionAPI extends ModelAPI {

}
10 changes: 10 additions & 0 deletions src/main/java/org/erathor/api/model/ModelAPI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.erathor.api.model;

public interface ModelAPI {

public Integer getId();

public void setId(Integer id);

public void updatedValues();
}

0 comments on commit 85deebd

Please sign in to comment.