diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2017-04-15 17:57:58 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2017-04-15 17:57:58 +0200 |
commit | 08f161e0f370e91ee4e0cacbe3fec6c6bd9316cc (patch) | |
tree | 36798da57f99dab5449083b691361795ef9ddd49 /java/MyMyBatis/src/AbstractDAO.java | |
parent | 5216c437a3aa95a22a603ff91126fb944b2da0a0 (diff) | |
download | share-08f161e0f370e91ee4e0cacbe3fec6c6bd9316cc.zip share-08f161e0f370e91ee4e0cacbe3fec6c6bd9316cc.tar.gz |
java : MyMyBatis goes functional interface
Diffstat (limited to 'java/MyMyBatis/src/AbstractDAO.java')
-rw-r--r-- | java/MyMyBatis/src/AbstractDAO.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/MyMyBatis/src/AbstractDAO.java b/java/MyMyBatis/src/AbstractDAO.java index 916d511..142b69f 100644 --- a/java/MyMyBatis/src/AbstractDAO.java +++ b/java/MyMyBatis/src/AbstractDAO.java @@ -20,9 +20,10 @@ public abstract class AbstractDAO<TObject, TMapper> static public SqlConnection getSqlConnection() { return conn; } - protected abstract class CallBack<TRet, TMapper> + @FunctionalInterface + public interface CallBack<TRet, TMapper> { - public abstract TRet call(TMapper m); + public TRet call(TMapper m); } protected int execInt(boolean commit, CallBack<Integer, TMapper> cb) |