+ public static Currency loadByName(String name) {
+ MobileLedgerProfile profile = Data.getProfile();
+ return profile.loadCurrencyByName(name);
+ }
+ public static Currency loadById(int id) {
+ MobileLedgerProfile profile = Data.getProfile();
+ return profile.loadCurrencyById(id);
+ }
+ static public boolean equal(Currency left, Currency right) {
+ if (left == null) {
+ return right == null;
+ }
+ else
+ return left.equals(right);
+ }
+ static public boolean equal(Currency left, String right) {
+ right = Misc.emptyIsNull(right);
+ if (left == null) {
+ return right == null;
+ }
+ else {
+ String leftName = Misc.emptyIsNull(left.getName());
+ if (leftName == null) {
+ return right == null;
+ }
+ else
+ return leftName.equals(right);
+ }
+ }