Package za.co.javajoe.dao

Source Code of za.co.javajoe.dao.AccountDao

package za.co.javajoe.dao;

import za.co.javajoe.domain.Account;

import java.util.ArrayList;
import java.util.List;

/**
* Created by TLOU on 2014/07/04.
*/
public class AccountDao {

    /*
        Dummy Data Generated by getAccountList
     */
    List<Account> accountList = new ArrayList<Account>();//movea the accountList from being
    //a local variable to being a global

    public List<Account> getAccountList(){

        System.out.println("====== Generating Account List" );



        Account acc = new Account();
        acc.setAccountID("1");
        acc.setAccountNumber("6222-12345");
        accountList.add(acc);

        acc = new Account();
        acc.setAccountID("2");
        acc.setAccountNumber("6333-12346");
        accountList.add(acc);

        acc = new Account();
        acc.setAccountID("3");
        acc.setAccountNumber("6444-12347");
        accountList.add(acc);

        System.out.println("====== Account List Created" );

        return  accountList;
    }

}
TOP

Related Classes of za.co.javajoe.dao.AccountDao

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.