import net.ktnx.mobileledger.async.DbOpQueue;
import net.ktnx.mobileledger.utils.Globals;
import net.ktnx.mobileledger.utils.Logger;
import net.ktnx.mobileledger.async.DbOpQueue;
import net.ktnx.mobileledger.utils.Globals;
import net.ktnx.mobileledger.utils.Logger;
public static MobileLedgerProfile loadAllFromDB(String currentProfileUUID) {
MobileLedgerProfile result = null;
ArrayList<MobileLedgerProfile> list = new ArrayList<>();
public static MobileLedgerProfile loadAllFromDB(String currentProfileUUID) {
MobileLedgerProfile result = null;
ArrayList<MobileLedgerProfile> list = new ArrayList<>();
try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
"auth_password, permit_posting, theme, order_no, " +
"preferred_accounts_filter FROM " +
try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
"auth_password, permit_posting, theme, order_no, " +
"preferred_accounts_filter FROM " +
db.beginTransaction();
try {
// debug("profiles", String.format("Storing profile in DB: uuid=%s, name=%s, " +
db.beginTransaction();
try {
// debug("profiles", String.format("Storing profile in DB: uuid=%s, name=%s, " +
// debug("profile", String.format("Transaction %d stored", tr.getId()));
}
public String getOption(String name, String default_value) {
// debug("profile", String.format("Transaction %d stored", tr.getId()));
}
public String getOption(String name, String default_value) {
try (Cursor cursor = db.rawQuery("select value from options where profile = ? and name=?",
new String[]{uuid, name}))
{
try (Cursor cursor = db.rawQuery("select value from options where profile = ? and name=?",
new String[]{uuid, name}))
{
setOption(name, String.valueOf(value));
}
public void removeFromDB() {
setOption(name, String.valueOf(value));
}
public void removeFromDB() {
return loadAccount(db, name);
}
@Nullable
public LedgerAccount tryLoadAccount(String acct_name) {
return loadAccount(db, name);
}
@Nullable
public LedgerAccount tryLoadAccount(String acct_name) {
}
public LedgerTransaction loadTransaction(int transactionId) {
LedgerTransaction tr = new LedgerTransaction(transactionId, this.uuid);
}
public LedgerTransaction loadTransaction(int transactionId) {
LedgerTransaction tr = new LedgerTransaction(transactionId, this.uuid);
}
public List<LedgerAccount> loadChildAccountsOf(LedgerAccount acc) {
List<LedgerAccount> result = new ArrayList<>();
}
public List<LedgerAccount> loadChildAccountsOf(LedgerAccount acc) {
List<LedgerAccount> result = new ArrayList<>();
try (Cursor c = db.rawQuery(
"SELECT a.name FROM accounts a WHERE a.profile = ? and a.name like ?||':%'",
new String[]{uuid, acc.getName()}))
try (Cursor c = db.rawQuery(
"SELECT a.name FROM accounts a WHERE a.profile = ? and a.name like ?||':%'",
new String[]{uuid, acc.getName()}))
try (Cursor c = db.rawQuery(
"SELECT a.name FROM accounts a WHERE a.profile = ? and a.name like ?||':%'",
new String[]{uuid, acc.getName()}))
try (Cursor c = db.rawQuery(
"SELECT a.name FROM accounts a WHERE a.profile = ? and a.name like ?||':%'",
new String[]{uuid, acc.getName()}))