X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FCurrency.java;h=6933930b6834494c5bccaf96fd3972f0b93864b5;hb=c27aa72c2c641bcd568692b4a20b125605cfb3b5;hp=e32513f2170a9ecba710631ea86a168df6f14ef7;hpb=34ded721286cec1412780c4b0b66c07029fffbe8;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Currency.java b/app/src/main/java/net/ktnx/mobileledger/model/Currency.java index e32513f2..6933930b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Currency.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Currency.java @@ -81,30 +81,9 @@ public class Currency { this.hasGap = hasGap; } public static Currency loadByName(String name) { - MobileLedgerProfile profile = Data.profile.getValue(); + MobileLedgerProfile profile = Data.getProfile(); return profile.loadCurrencyByName(name); } - public int getId() { - return id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public Position getPosition() { - return position; - } - public void setPosition(Position position) { - this.position = position; - } - public boolean hasGap() { - return hasGap; - } - public void setHasGap(boolean hasGap) { - this.hasGap = hasGap; - } static public boolean equal(Currency left, Currency right) { if (left == null) { return right == null; @@ -126,6 +105,27 @@ public class Currency { return leftName.equals(right); } } + public int getId() { + return id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Position getPosition() { + return position; + } + public void setPosition(Position position) { + this.position = position; + } + public boolean hasGap() { + return hasGap; + } + public void setHasGap(boolean hasGap) { + this.hasGap = hasGap; + } public enum Position { before(-1), after(1), unknown(0), none(-2); private int value;