Package net.sourceforge.wampum.finance.entities

Examples of net.sourceforge.wampum.finance.entities.AccountDAO.load()


    AccountDAO accountDAO = (AccountDAO)factory.getDAO("account");
    String whereClause = null;
    if (this.currentAccount.getAccountID() != null && !this.currentAccount.getAccountID().equals("")) {
      whereClause = "WHERE ACCOUNT_ID NOT IN ('" + this.currentAccount.getAccountID() + "')";
    }
    List accountList = accountDAO.load(whereClause, "ORDER BY TITLE", true);
    TreeAccount account = null;
    parentAccount.removeAllItems();
    parentAccount.addItem("None");
    int parentIndex = 0;
    for (int i=0; i<accountList.size(); i++) {
View Full Code Here


public class AccountTreeDAO {
 
  public static List loadAccountTree() {
    DAOFactory daoFactory = new DAOFactory();
    AccountDAO accountDao = (AccountDAO)daoFactory.getDAO("account");
    List accountList = accountDao.load(null, "ORDER BY TITLE", true);
   
    // get root list
    List rootList = new ArrayList();
    Account account = null;
    int count = 0;
View Full Code Here

    super();
    this.setRenderer(new AccountRenderer());
   
    DAOFactory factory = new DAOFactory();
    AccountDAO accountDAO = (AccountDAO)factory.getDAO("account");
    accountList = accountDAO.load(null, "ORDER BY TITLE", true);
    Account account = null;
    for (int i=0; i<accountList.size(); i++) {
      account = (Account)accountList.get(i);
      this.addItem(account);
    }
View Full Code Here

          if (transSplit.getAccount() == null) {
            return null;
          }
          else {
            AccountDAO accountDao = (AccountDAO)daoFactory.getDAO("account");
            List accountList = accountDao.load("WHERE ACCOUNT_ID = '" + transSplit.getAccountAccountID() + "'", null, true);
            return accountList.get(0);
          }
        }
        else if (col == 2) {
          if (amount == null)
View Full Code Here

              if (!createTrans)
                return;
            }
           
            AccountDAO accountDAO = (AccountDAO)factory.getDAO("account");
            Account newAccount = (Account)accountDAO.load("WHERE TITLE = 'Imbalance-USD'", null, true).get(0);
            TransSplit transSplit = new TransSplit();
            transSplit.setParentTransaction(trans);
            Account account = new Account();
            account.setAccountID(accountID);
            transSplit.setAccount(account);
View Full Code Here

              trans.appendTransSplit(newSplit);
            }
          }
          else {
            AccountDAO accountDAO = (AccountDAO)factory.getDAO("account");
            Account newAccount = (Account)accountDAO.load("WHERE TITLE = 'Imbalance-USD'", null, true).get(0);
            TransSplit transSplit = new TransSplit();
            transSplit.setParentTransaction(trans);
            Account account = new Account();
            account.setAccountID(accountID);
            transSplit.setAccount(account);
View Full Code Here

      AccountDAO accountDAO = (AccountDAO)daoFactory.getDAO("account");
      try {
        if (this.eventListener != null)
          this.eventListener.GNUCashEvent(new GNUCashEvent("Acocunt: " + currentAccount.getTitle()));
        String where = "where ACCOUNT_ID = '" + currentAccount.getAccountID() + "'";
        if (accountDAO.load(where, null, true).size() == 0)
          accountDAO.create(currentAccount, false);
        else
          accountDAO.update(currentAccount, false);
      }
      catch (Exception ex) {
View Full Code Here

            XMLUtil.appendChildNode(payeesElement, PayeeXML.createXMLDocument(payee).getDocumentElement());
          }
         
          Element accountsElement = XMLUtil.newChildElement(doc.getDocumentElement(), "Accounts", null);
          AccountDAO accountDAO = (AccountDAO)daoFactory.getDAO("account");
          List accounts = accountDAO.load(null, "ORDER BY TITLE", false);
          Account account = null;
          for (int i=0; i<accounts.size(); i++) {
            account = (Account)accounts.get(i);
            account.setAccountList(new ArrayList());
            XMLUtil.appendChildNode(accountsElement, AccountXML.createXMLDocument(account).getDocumentElement());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.