summaryrefslogtreecommitdiffstats
path: root/java/MyMyBatis/src/Main.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2017-04-19 16:01:19 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2017-04-19 16:01:19 +0200
commit8ec2af6e29ecb29645367a28fb1a48cf7f4f24ff (patch)
treeb30a535b4bdcde33e148110b018e39c7d6d7b989 /java/MyMyBatis/src/Main.java
parent77653bb945a5ae8adfed549fd4c5d908f5a514ae (diff)
downloadshare-8ec2af6e29ecb29645367a28fb1a48cf7f4f24ff.zip
share-8ec2af6e29ecb29645367a28fb1a48cf7f4f24ff.tar.gz
java : MyMyBatis : add AbstractModel<> to implement save in AbstractDAOOperations<>
Diffstat (limited to 'java/MyMyBatis/src/Main.java')
-rw-r--r--java/MyMyBatis/src/Main.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/MyMyBatis/src/Main.java b/java/MyMyBatis/src/Main.java
index 043e978..ad371f7 100644
--- a/java/MyMyBatis/src/Main.java
+++ b/java/MyMyBatis/src/Main.java
@@ -38,7 +38,7 @@ public class Main
System.out.println("selectOne : " + m.toString());
System.out.println("update ...");
m.setName("adios");
- dao.update(m);
+ dao.save(m);
m = dao.selectOne(2);
failIf(m == null , "selectOne()");
failIf(!m.getName().equals("adios") , "selectOne()");
@@ -50,8 +50,8 @@ public class Main
failIf(count != 1, "count()");
System.out.println("count : " + count);
System.out.println("insert ...");
- m = new Model(-1, "HoMySatan");
- count = dao.insert(m);
+ m = new Model("HoMySatan");
+ count = dao.save(m);
failIf(count != 1, "insert()");
count = dao.count();
failIf(count != 2, "count()");