]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/DbOpItem.java
DbOp*: optional post-execute hook
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / DbOpItem.java
index 7ecce275afbbab35322133b67c2fc4eec932fe34..b031dc64791dfc8cdd778d9a468fc677a16b9d45 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -20,11 +20,16 @@ package net.ktnx.mobileledger.async;
 class DbOpItem {
     String sql;
     Object[] params;
-    public DbOpItem(String sql, Object[] params) {
+    Runnable onReady;
+    public DbOpItem(String sql, Object[] params, Runnable onReady) {
         this.sql = sql;
         this.params = params;
+        this.onReady = onReady;
+    }
+    public DbOpItem(String sql, Object[] params) {
+        this(sql, params, null);
     }
     public DbOpItem(String sql) {
-        this(sql, null);
+        this(sql, null, null);
     }
 }