package DAO;import Bean.Account;
import Bean.Income;
import Bean.Payout;
public interface collectDAO {
/**
 * @author 按月进行汇总,通过支出和收入的id得到每个分类。并且进行数据分页 ,每页20条数据
 */
public String collectConth(Payout payoutid,Income incomeid);

/**
 * @author 按周进行汇总,通过支出和收入的id得到每个分类。并且进行数据分页 ,每页20条数据
 */
public String collectWeek(Payout payoutid,Income incomeid);

/**
 * @author 按支出行汇总,通过支出的id得到每个分类。并且进行数据分页 ,每页20条数据
 */
public String payoutType(Payout payoutid);

/**
 * @author 按收入行汇总,通过收入的id得到每个分类。并且进行数据分页 ,每页20条数据
 */
public String incomeType(Income incomeid);





}
帮忙把代码补齐!!

解决方案 »

  1.   

    package Bean;import java.util.HashSet;
    import java.util.Set;/**
     * Account entity. @author MyEclipse Persistence Tools
     */public class Account implements java.io.Serializable { // Fields private Integer accountId;
    private User user;
    private String name;
    private Double balance;
    private Set incomes = new HashSet(0);
    private Set payouts = new HashSet(0); // Constructors /** default constructor */
    public Account() {
    } /** minimal constructor */
    public Account(Integer accountId, String name, Double balance) {
    this.accountId = accountId;
    this.name = name;
    this.balance = balance;
    } /** full constructor */
    public Account(Integer accountId, User user, String name, Double balance,
    Set incomes, Set payouts) {
    this.accountId = accountId;
    this.user = user;
    this.name = name;
    this.balance = balance;
    this.incomes = incomes;
    this.payouts = payouts;
    } // Property accessors public Integer getAccountId() {
    return this.accountId;
    } public void setAccountId(Integer accountId) {
    this.accountId = accountId;
    } public User getUser() {
    return this.user;
    } public void setUser(User user) {
    this.user = user;
    } public String getName() {
    return this.name;
    } public void setName(String name) {
    this.name = name;
    } public Double getBalance() {
    return this.balance;
    } public void setBalance(Double balance) {
    this.balance = balance;
    } public Set getIncomes() {
    return this.incomes;
    } public void setIncomes(Set incomes) {
    this.incomes = incomes;
    } public Set getPayouts() {
    return this.payouts;
    } public void setPayouts(Set payouts) {
    this.payouts = payouts;
    }}
      

  2.   

    package Bean;import java.sql.Timestamp;/**
     * Income entity. @author MyEclipse Persistence Tools
     */public class Income implements java.io.Serializable { // Fields private Integer incomeId;
    private IncomeCategory incomeCategory;
    private Account account;
    private Double money;
    private Timestamp incomeTime; // Constructors /** default constructor */
    public Income() {
    } /** minimal constructor */
    public Income(Integer incomeId, Double money, Timestamp incomeTime) {
    this.incomeId = incomeId;
    this.money = money;
    this.incomeTime = incomeTime;
    } /** full constructor */
    public Income(Integer incomeId, IncomeCategory incomeCategory,
    Account account, Double money, Timestamp incomeTime) {
    this.incomeId = incomeId;
    this.incomeCategory = incomeCategory;
    this.account = account;
    this.money = money;
    this.incomeTime = incomeTime;
    } // Property accessors public Integer getIncomeId() {
    return this.incomeId;
    } public void setIncomeId(Integer incomeId) {
    this.incomeId = incomeId;
    } public IncomeCategory getIncomeCategory() {
    return this.incomeCategory;
    } public void setIncomeCategory(IncomeCategory incomeCategory) {
    this.incomeCategory = incomeCategory;
    } public Account getAccount() {
    return this.account;
    } public void setAccount(Account account) {
    this.account = account;
    } public Double getMoney() {
    return this.money;
    } public void setMoney(Double money) {
    this.money = money;
    } public Timestamp getIncomeTime() {
    return this.incomeTime;
    } public void setIncomeTime(Timestamp incomeTime) {
    this.incomeTime = incomeTime;
    }}
      

  3.   

    package Bean;import java.sql.Timestamp;/**
     * Payout entity. @author MyEclipse Persistence Tools
     */public class Payout implements java.io.Serializable { // Fields private Integer payoutId;
    private Account account;
    private PayoutCategory payoutCategory;
    private Double money;
    private Timestamp payoutTime; // Constructors /** default constructor */
    public Payout() {
    } /** minimal constructor */
    public Payout(Integer payoutId, Double money, Timestamp payoutTime) {
    this.payoutId = payoutId;
    this.money = money;
    this.payoutTime = payoutTime;
    } /** full constructor */
    public Payout(Integer payoutId, Account account,
    PayoutCategory payoutCategory, Double money, Timestamp payoutTime) {
    this.payoutId = payoutId;
    this.account = account;
    this.payoutCategory = payoutCategory;
    this.money = money;
    this.payoutTime = payoutTime;
    } // Property accessors public Integer getPayoutId() {
    return this.payoutId;
    } public void setPayoutId(Integer payoutId) {
    this.payoutId = payoutId;
    } public Account getAccount() {
    return this.account;
    } public void setAccount(Account account) {
    this.account = account;
    } public PayoutCategory getPayoutCategory() {
    return this.payoutCategory;
    } public void setPayoutCategory(PayoutCategory payoutCategory) {
    this.payoutCategory = payoutCategory;
    } public Double getMoney() {
    return this.money;
    } public void setMoney(Double money) {
    this.money = money;
    } public Timestamp getPayoutTime() {
    return this.payoutTime;
    } public void setPayoutTime(Timestamp payoutTime) {
    this.payoutTime = payoutTime;
    }}