+ public static MobileLedgerProfile fromDBO(Profile newProfile) {
+ MobileLedgerProfile p = new MobileLedgerProfile(newProfile.getId());
+ p.setDetectedVersion(new HledgerVersion(newProfile.getDetectedVersionMajor(),
+ newProfile.getDetectedVersionMinor()));
+ p.setApiVersion(newProfile.getApiVersion());
+ p.setAuthEnabled(newProfile.useAuthentication());
+ p.setAuthUserName(newProfile.getAuthUser());
+ p.setAuthPassword(newProfile.getAuthPassword());
+ p.setDefaultCommodity(newProfile.getDefaultCommodity());
+ p.setFutureDates(newProfile.getFutureDates());
+ p.setName(newProfile.getName());
+ p.setPostingPermitted(newProfile.permitPosting());
+ p.setPreferredAccountsFilter(newProfile.getPreferredAccountsFilter());
+ p.setShowCommentsByDefault(newProfile.getShowCommentsByDefault());
+ p.setShowCommodityByDefault(newProfile.getShowCommodityByDefault());
+ p.setUrl(newProfile.getUrl());
+ p.setThemeId(newProfile.getTheme());
+
+ return p;
+ }