orderNo = origin.orderNo;
futureDates = origin.futureDates;
apiVersion = origin.apiVersion;
orderNo = origin.orderNo;
futureDates = origin.futureDates;
apiVersion = origin.apiVersion;
try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
"auth_password, permit_posting, theme, order_no, " +
"preferred_accounts_filter, future_dates, api_version, " +
try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
"auth_password, permit_posting, theme, order_no, " +
"preferred_accounts_filter, future_dates, api_version, " +
"profiles order by order_no", null))
{
while (cursor.moveToNext()) {
"profiles order by order_no", null))
{
while (cursor.moveToNext()) {
item.setFutureDates(cursor.getInt(10));
item.setApiVersion(cursor.getInt(11));
item.setShowCommodityByDefault(cursor.getInt(12) == 1);
item.setFutureDates(cursor.getInt(10));
item.setApiVersion(cursor.getInt(11));
item.setShowCommodityByDefault(cursor.getInt(12) == 1);
public void setShowCommodityByDefault(boolean showCommodityByDefault) {
this.showCommodityByDefault = showCommodityByDefault;
}
public void setShowCommodityByDefault(boolean showCommodityByDefault) {
this.showCommodityByDefault = showCommodityByDefault;
}
+ public String getDefaultCommodity() {
+ return defaultCommodity;
+ }
+ public void setDefaultCommodity(String defaultCommodity) {
+ this.defaultCommodity = defaultCommodity;
+ }
+ public void setDefaultCommodity(CharSequence defaultCommodity) {
+ if (defaultCommodity == null)
+ this.defaultCommodity = null;
+ else
+ this.defaultCommodity = String.valueOf(defaultCommodity);
+ }
db.execSQL("REPLACE INTO profiles(uuid, name, permit_posting, url, " +
"use_authentication, auth_user, auth_password, theme, order_no, " +
"preferred_accounts_filter, future_dates, api_version, " +
db.execSQL("REPLACE INTO profiles(uuid, name, permit_posting, url, " +
"use_authentication, auth_user, auth_password, theme, order_no, " +
"preferred_accounts_filter, future_dates, api_version, " +
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
new Object[]{uuid, name, permitPosting, url, authEnabled,
authEnabled ? authUserName : null,
authEnabled ? authPassword : null, themeHue, orderNo,
preferredAccountsFilter, futureDates.toInt(), apiVersion.toInt(),
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
new Object[]{uuid, name, permitPosting, url, authEnabled,
authEnabled ? authUserName : null,
authEnabled ? authPassword : null, themeHue, orderNo,
preferredAccountsFilter, futureDates.toInt(), apiVersion.toInt(),