Package net.sourceforge.wampum.system.data

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


                    }
                    else {
                        String accountID = new String(resultSet.getString("ACCOUNT_ID"));
                        if (!resultSet.wasNull()) {
                            String accountWhere = "WHERE ACCOUNT_ID = '" + accountID.toString() + "' ";
                            DAO dao = daoFactory.getDAO("account");
                            List accountList = dao.load(accountWhere, null, true);
                            if (accountList.size()>0) {
                                Account parentAccount = (Account)accountList.get(0);
                                budget.setAccountID(parentAccount);
                            }
                       }
View Full Code Here


                    }
                    else {
                        String transactionID = new String(resultSet.getString("PARENT_TRANS_ID"));
                        if (!resultSet.wasNull()) {
                            String transactionWhere = "WHERE TRANSACTION_ID = '" + transactionID.toString() + "' ";
                            DAO dao = daoFactory.getDAO("transaction");
                            List transactionList = dao.load(transactionWhere, null, true);
                            if (transactionList.size()>0) {
                                Transaction parentTransaction = (Transaction)transactionList.get(0);
                                transSplit.setParentTransaction(parentTransaction);
                            }
                       }
                    }
                }
                if (resultSet.wasNull())
                    transSplit.setParentTransaction(null);

                resultSet.getString("ACCOUNT_ID");
                if (!resultSet.wasNull()) {
                    if (lazyLoad) {
                        Account parentAccount = new Account();
                        parentAccount.setAccountID(new String(resultSet.getString("ACCOUNT_ID")));
                        transSplit.setAccount(parentAccount);
                    }
                    else {
                        String accountID = new String(resultSet.getString("ACCOUNT_ID"));
                        if (!resultSet.wasNull()) {
                            String accountWhere = "WHERE ACCOUNT_ID = '" + accountID.toString() + "' ";
                            DAO dao = daoFactory.getDAO("account");
                            List accountList = dao.load(accountWhere, null, true);
                            if (accountList.size()>0) {
                                Account parentAccount = (Account)accountList.get(0);
                                transSplit.setAccount(parentAccount);
                            }
                       }
View Full Code Here

                payee.setLastUserID(new Integer(resultSet.getInt("LAST_USER_ID")));
                if (resultSet.wasNull())
                    payee.setLastUserID(null);

                if (!lazyLoad) {
                    DAO dao = daoFactory.getDAO("transaction");
                    List transactionList = dao.load("WHERE PAYEE_ID = '" + payee.getPayeeID() + "'",null,true);
                    Transaction childTransaction = null;
                    for (int i=0; i<transactionList.size(); i++) {
                        childTransaction = (Transaction)transactionList.get(i);
                        childTransaction.setPayee(payee);
                    }
View Full Code Here

           preparedStatement.execute();

           if (storeChildren) {
               List childList = payee.getTransactionList();
               Transaction childTransaction = null;
               DAO dao = daoFactory.getDAO("transaction");
               for (int i=0; i<childList.size(); i++) {
                   childTransaction = (Transaction)childList.get(i);
                   dao.store(childTransaction,true);
               }
           }

       }
       catch (Exception ex) {
View Full Code Here

           preparedStatement.executeUpdate();

           if (storeChildren) {
               List childList = payee.getTransactionList();
               Transaction childTransaction = null;
               DAO dao = daoFactory.getDAO("transaction");
               for (int i=0; i<childList.size(); i++) {
                   childTransaction = (Transaction)childList.get(i);
                   dao.store(childTransaction,true);
               }
           }

        }
        catch (Exception ex) {
View Full Code Here

                    }
                    else {
                        String payeeID = new String(resultSet.getString("PAYEE_ID"));
                        if (!resultSet.wasNull()) {
                            String payeeWhere = "WHERE PAYEE_ID = '" + payeeID.toString() + "' ";
                            DAO dao = daoFactory.getDAO("payee");
                            List payeeList = dao.load(payeeWhere, null, true);
                            if (payeeList.size()>0) {
                                Payee parentPayee = (Payee)payeeList.get(0);
                                transaction.setPayee(parentPayee);
                            }
                       }
                    }
                }
                if (resultSet.wasNull())
                    transaction.setPayee(null);

                transaction.setActive(new Boolean(resultSet.getBoolean("ACTIVE")));
                if (resultSet.wasNull())
                    transaction.setActive(null);

                Date lastUpdateDate = resultSet.getDate("LAST_UPDATE");
                if (!resultSet.wasNull()) {
                    Calendar lastUpdateCalendar = new GregorianCalendar();
                    lastUpdateCalendar.setTime(lastUpdateDate);
                    transaction.setLastUpdate(lastUpdateCalendar);
                }
                if (resultSet.wasNull())
                    transaction.setLastUpdate(null);

                transaction.setLastUserID(new Integer(resultSet.getInt("LAST_USER_ID")));
                if (resultSet.wasNull())
                    transaction.setLastUserID(null);

                if (!lazyLoad) {
                    DAO dao = daoFactory.getDAO("transSplit");
                    List transSplitList = dao.load("WHERE PARENT_TRANS_ID = '" + transaction.getTransactionID() + "'",null,true);
                    TransSplit childTransSplit = null;
                    for (int i=0; i<transSplitList.size(); i++) {
                        childTransSplit = (TransSplit)transSplitList.get(i);
                        childTransSplit.setParentTransaction(transaction);
                    }
View Full Code Here

           preparedStatement.execute();

           if (storeChildren) {
               List childList = transaction.getTransSplitList();
               TransSplit childTransSplit = null;
               DAO dao = daoFactory.getDAO("transSplit");
               for (int i=0; i<childList.size(); i++) {
                   childTransSplit = (TransSplit)childList.get(i);
                   dao.store(childTransSplit,true);
               }
           }

       }
       catch (Exception ex) {
View Full Code Here

           preparedStatement.executeUpdate();

           if (storeChildren) {
               List childList = transaction.getTransSplitList();
               TransSplit childTransSplit = null;
               DAO dao = daoFactory.getDAO("transSplit");
               for (int i=0; i<childList.size(); i++) {
                   childTransSplit = (TransSplit)childList.get(i);
                   dao.store(childTransSplit,true);
               }
           }

        }
        catch (Exception ex) {
View Full Code Here

                    }
                    else {
                        String accountID = new String(resultSet.getString("PARENT_ID"));
                        if (!resultSet.wasNull()) {
                            String accountWhere = "WHERE ACCOUNT_ID = '" + accountID.toString() + "' ";
                            DAO dao = daoFactory.getDAO("account");
                            List accountList = dao.load(accountWhere, null, true);
                            if (accountList.size()>0) {
                                Account parentAccount = (Account)accountList.get(0);
                                account.setParentAccount(parentAccount);
                            }
                       }
                    }
                }
                if (resultSet.wasNull())
                    account.setParentAccount(null);

                account.setActive(new Boolean(resultSet.getBoolean("ACTIVE")));
                if (resultSet.wasNull())
                    account.setActive(null);

                Date lastUpdateDate = resultSet.getDate("LAST_UPDATE");
                if (!resultSet.wasNull()) {
                    Calendar lastUpdateCalendar = new GregorianCalendar();
                    lastUpdateCalendar.setTime(lastUpdateDate);
                    account.setLastUpdate(lastUpdateCalendar);
                }
                if (resultSet.wasNull())
                    account.setLastUpdate(null);

                account.setLastUserID(new Integer(resultSet.getInt("LAST_USER_ID")));
                if (resultSet.wasNull())
                    account.setLastUserID(null);

                if (!lazyLoad) {
                    DAO dao = daoFactory.getDAO("account");
                    List accountList = dao.load("WHERE PARENT_ID = '" + account.getAccountID() + "'",null,true);
                    Account childAccount = null;
                    for (int i=0; i<accountList.size(); i++) {
                        childAccount = (Account)accountList.get(i);
                        childAccount.setParentAccount(account);
                    }
View Full Code Here

           preparedStatement.execute();

           if (storeChildren) {
               List childList = account.getAccountList();
               Account childAccount = null;
               DAO dao = daoFactory.getDAO("account");
               for (int i=0; i<childList.size(); i++) {
                   childAccount = (Account)childList.get(i);
                   dao.store(childAccount,true);
               }
           }

       }
       catch (Exception ex) {
View Full Code Here

TOP

Related Classes of net.sourceforge.wampum.system.data.DAO

Copyright © 2018 www.massapicom. 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.