]> git.ktnx.net Git - mobile-ledger.git/commitdiff
copy constructor for MobileLedgerProfile
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 28 Apr 2019 18:09:09 +0000 (21:09 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 28 Apr 2019 18:09:09 +0000 (21:09 +0300)
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java

index a75ac72aae165e02cb40e76aa17bc3c8a5a7b471..4822a92aa15182f974db2e3d8a6560dc7023296d 100644 (file)
@@ -52,6 +52,18 @@ public final class MobileLedgerProfile {
     public MobileLedgerProfile(String uuid) {
         this.uuid = uuid;
     }
+    public MobileLedgerProfile(MobileLedgerProfile origin) {
+        uuid = origin.uuid;
+        name = origin.name;
+        permitPosting = origin.permitPosting;
+        preferredAccountsFilter = origin.preferredAccountsFilter;
+        url = origin.url;
+        authEnabled = origin.authEnabled;
+        authUserName = origin.authUserName;
+        authPassword = origin.authPassword;
+        themeId = origin.themeId;
+        orderNo = origin.orderNo;
+    }
     // loads all profiles into Data.profiles
     // returns the profile with the given UUID
     public static MobileLedgerProfile loadAllFromDB(String currentProfileUUID) {