X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FLedgerTransaction.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FLedgerTransaction.java;h=001c107e0193b2a5c5a272bb6c60ec232a1a5e74;hp=fb773bf81055dcd8c26608f0764478d42cce9337;hb=2de3d8a8c96e78f4ab89880be9fab05735acc910;hpb=479ae397be60069ac6cb11e4507136dff01d65da diff --git a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java index fb773bf8..001c107e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java @@ -53,18 +53,17 @@ public class LedgerTransaction { return Float.compare(o1.getAmount(), o2.getAmount()); }; private final long profile; - private final Integer id; + private final long id; private final List accounts; private SimpleDate date; private String description; private String comment; private String dataHash; private boolean dataLoaded; - public LedgerTransaction(Integer id, String dateString, String description) - throws ParseException { + public LedgerTransaction(long id, String dateString, String description) throws ParseException { this(id, Globals.parseLedgerDate(dateString), description); } - public LedgerTransaction(Integer id, SimpleDate date, String description, + public LedgerTransaction(long id, SimpleDate date, String description, MobileLedgerProfile profile) { this.profile = profile.getId(); this.id = id; @@ -74,11 +73,11 @@ public class LedgerTransaction { this.dataHash = null; dataLoaded = false; } - public LedgerTransaction(Integer id, SimpleDate date, String description) { + public LedgerTransaction(long id, SimpleDate date, String description) { this(id, date, description, Data.getProfile()); } public LedgerTransaction(SimpleDate date, String description) { - this(null, date, description); + this(0, date, description); } public LedgerTransaction(int id) { this(id, (SimpleDate) null, null); @@ -126,7 +125,7 @@ public class LedgerTransaction { public void setComment(String comment) { this.comment = comment; } - public int getId() { + public long getId() { return id; } protected void fillDataHash() {