]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/db/Transaction.java
speed up transaction storage a bit
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / db / Transaction.java
index 05e63d8c0e92dd05c3db2aa48603a65159d5cd6e..fcbdd82b7fc5d289fa0ff3520c5078ea3d11d246 100644 (file)
@@ -64,7 +64,7 @@ public class Transaction {
     @ColumnInfo
     private String comment;
     @ColumnInfo
-    private int generation = 0;
+    private long generation = 0;
     public long getLedgerId() {
         return ledgerId;
     }
@@ -119,11 +119,23 @@ public class Transaction {
     public void setComment(String comment) {
         this.comment = comment;
     }
-    public int getGeneration() {
+    public long getGeneration() {
         return generation;
     }
-    public void setGeneration(int generation) {
+    public void setGeneration(long generation) {
         this.generation = generation;
     }
 
+    public void copyDataFrom(Transaction o) {
+        // id = o.id;
+        ledgerId = o.ledgerId;
+        profileId = o.profileId;
+        dataHash = o.dataHash;
+        year = o.year;
+        month = o.month;
+        day = o.day;
+        description = o.description;
+        comment = o.comment;
+        generation = o.generation;
+    }
 }