summaryrefslogtreecommitdiffstats
path: root/java/MyMyBatis/src/AbstractModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/MyMyBatis/src/AbstractModel.java')
-rw-r--r--java/MyMyBatis/src/AbstractModel.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/MyMyBatis/src/AbstractModel.java b/java/MyMyBatis/src/AbstractModel.java
index 365472c..7ed83aa 100644
--- a/java/MyMyBatis/src/AbstractModel.java
+++ b/java/MyMyBatis/src/AbstractModel.java
@@ -11,5 +11,9 @@ public interface AbstractModel<TIdentity, TObject>
default void save() { getDAO().save(self()); }
default int delete() { return getDAO().delete(self()); }
+
+ default void reload() { feedFrom(getDAO().selectSelf(self())); }
+
+ void feedFrom(TObject obj);
}