diff options
Diffstat (limited to 'java/MyMyBatis/src/Model.java')
-rw-r--r-- | java/MyMyBatis/src/Model.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/java/MyMyBatis/src/Model.java b/java/MyMyBatis/src/Model.java index 676cdde..daa7938 100644 --- a/java/MyMyBatis/src/Model.java +++ b/java/MyMyBatis/src/Model.java @@ -3,7 +3,7 @@ package ch.asynk; import lombok.Setter; import lombok.Getter; -public class Model implements AbstractModel<Integer> +public class Model implements AbstractModel<Integer, Model> { private @Setter @Getter Integer id; private @Setter @Getter String name; @@ -26,6 +26,18 @@ public class Model implements AbstractModel<Integer> } @Override + public Model self() + { + return this; + } + + @Override + public ModelMapper getDAO() + { + return ModelDAO.getInstance(); + } + + @Override public String toString() { return String.format("model [%d] %s", id, name); |