Examples of DAOFactory


Examples of net.sourceforge.wampum.system.data.DAOFactory

  }
 
  private static String[] columnNames = {"Date", "Deposit Accounts", "Withdraw Accounts", "Amount"};
  private void updateRegisterTableData() {
    if (currentPayee != null) {
      DAOFactory daoFactory = new DAOFactory();
      RegisterDAO registerDao = (RegisterDAO)daoFactory.getDAO("register");
      transactionList = registerDao.loadTransactionsForPayee(currentPayee.getPayeeID());
    }
   
    TableModel dataModel = new AbstractTableModel() {
      private static final long serialVersionUID = 1;
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

  public void actionPerformed(ActionEvent e) {
    if ("saveButton".equals(e.getActionCommand())) {
      currentPayee.setName(name.getText());
      currentPayee.setFilters(filters.getText());
      currentPayee.setActive(new Boolean(true));
      DAOFactory daoFactory = new DAOFactory();
      PayeeDAO payeeDao = (PayeeDAO)daoFactory.getDAO("payee");
      payeeDao.store(currentPayee, false);
      buildPayeesTree();
      buildPayeeDropDown();
      checkButtonStatus();
    }
    else if ("clearButton".equals(e.getActionCommand())) {
        currentPayee = new Payee();
        name.setText(currentPayee.getName());
        filters.setText(currentPayee.getFilters());
        updateRegisterTableData();
        checkButtonStatus();
    }
    else if ("deleteButton".equals(e.getActionCommand())) {
      DAOFactory daoFactory = new DAOFactory();
      PayeeDAO payeeDao = (PayeeDAO)daoFactory.getDAO("payee");
      currentPayee.setActive(new Boolean(false));
      payeeDao.delete(currentPayee);
     
        currentPayee = new Payee();
        name.setText(currentPayee.getName());
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

public abstract class Controller {

  protected DAOFactory daoFactory = null;
 
  public Controller() {
    daoFactory = new DAOFactory();
  }
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

      };
      chooser.setFileFilter(filter);
      int returnVal = chooser.showSaveDialog(Main.mainFrame);
      if(returnVal == JFileChooser.APPROVE_OPTION) {
        try {
          DAOFactory daoFactory = new DAOFactory();
          PayeeDAO payeeDao = (PayeeDAO)daoFactory.getDAO("payee");
          List payeeList = payeeDao.load(null, "ORDER BY NAME", true);
         
          File file = chooser.getSelectedFile();
          FileWriter fileWriter = new FileWriter(file);
         
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

         
          // build xml
          Document doc = XMLUtil.newDocument("Wampum");
          Element payeesElement = XMLUtil.newChildElement(doc.getDocumentElement(), "Payees", null);
         
          DAOFactory daoFactory = new DAOFactory();
          PayeeDAO payeeDAO = (PayeeDAO)daoFactory.getDAO("payee");
          List payees = payeeDAO.load("", "ORDER BY NAME", true);
          Payee payee = null;
          for (int i=0; i<payees.size(); i++) {
            payee = (Payee)payees.get(i);
            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());
          }
         
          Element transElement = XMLUtil.newChildElement(doc.getDocumentElement(), "Transactions", null);
          TransactionDAO transDAO = (TransactionDAO)daoFactory.getDAO("transaction");
          List transList = transDAO.load(null, null, false);
          Transaction trans = null;
          for (int i=0; i<transList.size(); i++) {
            trans = (Transaction)transList.get(i);
            List transSplitList = trans.getTransSplitList();
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

      chooser.setFileFilter(filter);
     
      int returnVal = chooser.showOpenDialog(Main.mainFrame);
      if(returnVal == JFileChooser.APPROVE_OPTION) {
        try {
          DAOFactory daoFactory = new DAOFactory();
          PayeeDAO payeeDao = (PayeeDAO)daoFactory.getDAO("payee");
          List payeeList = payeeDao.load(null, "ORDER BY NAME", true);
         
          File file = chooser.getSelectedFile();
          BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
          String line = null;
View Full Code Here

Examples of org.apache.stonehenge.stocktrader.dal.DAOFactory

  public CustomQuoteBean getQuoteForUpdate(String symbol) throws DAOException {
    if (logger.isDebugEnabled()) {
      logger.debug("OrderDAO.getQuoteForUpdate()\nSymbol :" + symbol);
    }

    DAOFactory fac = MSSQLDAOFactory.getInstance();
    MarketSummaryDAO marketSummaryDAO = fac.getMarketSummaryDAO();
    return marketSummaryDAO.getQuoteForUpdate(symbol);
  }
View Full Code Here

Examples of org.jSyncManager.SJS.Adapters.SMTPServer.Config.DAOFactory

   /**
    * Load configuration values, setup mailbox
    */
   public void init() {
      DAOFactory factory = DAOFactory.instance(DAOFactory.DEFAULT);
      ConfigDAO configDAO = factory.getConfigDAO();
     
      // possible locations for smtp_server.xml
      String propertyfile = System.getProperty("sjs.smtpserver.propertyfile");
      File option1 = null;
      if (propertyfile != null) {
View Full Code Here

Examples of org.uengine.persistence.dao.DAOFactory

  }
 
  public void setPermission(int defId, String userType, String userCodes, String[] permissions) {
    Connection conn = null;
    PreparedStatement stmt = null;
    DAOFactory df = null;
   
    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      String strSeq = df.getSequenceSql("ACLTABLE");
      String seqColun = "";
      if (UEngineUtil.isNotEmpty(strSeq)) {
        strSeq = ", " + strSeq;
        seqColun = ", acltableid";
      }
View Full Code Here

Examples of org.uengine.persistence.dao.DAOFactory

  }
 
  public void setDefaultPermission(int defId, String[] permissionA, String[] permissionM) {
    Connection conn  = null;
    PreparedStatement stmt = null;
    DAOFactory df = null;
    StringBuffer sql = new StringBuffer();
   
    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      conn = dcf.getConnection();
      sql.append(" DELETE FROM bpm_acltable WHERE defid = ? AND defaultuser IS NOT NULL ");
      stmt = conn.prepareStatement(sql.toString());
      stmt.setInt(1, defId);
      stmt.execute();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      if (stmt != null) try { stmt.close(); } catch (Exception e2) {}
      if (conn != null) try { conn.close(); } catch (Exception e2) {}
    }
   

    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      String strSeq = df.getSequenceSql("ACLTABLE");
      String seqColun = "";
      if (UEngineUtil.isNotEmpty(strSeq)) {
        strSeq = ", " + strSeq;
        seqColun = ", acltableid";
      }
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.