Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
28514 amit.gupta 1
package com.spice.profitmandi.dao.model;
2
 
3
import in.shop2020.model.v1.order.WalletReferenceType;
4
 
5
public class AccountStatementModel {
6
	private WalletReferenceType walletReferenceType;
7
	private long credit;
8
	private long debit;
9
 
10
 
11
	public AccountStatementModel(WalletReferenceType walletReferenceType, long credit, long debit) {
12
		super();
13
		this.walletReferenceType = walletReferenceType;
14
		this.credit = credit;
15
		this.debit = debit;
16
	}
17
	@Override
18
	public String toString() {
19
		return "AccountStatementModel [walletReferenceType=" + walletReferenceType + ", credit=" + credit + ", debit="
20
				+ debit + "]";
21
	}
22
	public WalletReferenceType getWalletReferenceType() {
23
		return walletReferenceType;
24
	}
25
	public void setWalletReferenceType(WalletReferenceType walletReferenceType) {
26
		this.walletReferenceType = walletReferenceType;
27
	}
28
	public long getCredit() {
29
		return credit;
30
	}
31
	public void setCredit(long credit) {
32
		this.credit = credit;
33
	}
34
	public long getDebit() {
35
		return debit;
36
	}
37
	public void setDebit(long debit) {
38
		this.debit = debit;
39
	}
40
	@Override
41
	public int hashCode() {
42
		final int prime = 31;
43
		int result = 1;
44
		result = prime * result + (int) (credit ^ (credit >>> 32));
45
		result = prime * result + (int) (debit ^ (debit >>> 32));
46
		result = prime * result + ((walletReferenceType == null) ? 0 : walletReferenceType.hashCode());
47
		return result;
48
	}
49
	@Override
50
	public boolean equals(Object obj) {
51
		if (this == obj)
52
			return true;
53
		if (obj == null)
54
			return false;
55
		if (getClass() != obj.getClass())
56
			return false;
57
		AccountStatementModel other = (AccountStatementModel) obj;
58
		if (credit != other.credit)
59
			return false;
60
		if (debit != other.debit)
61
			return false;
62
		if (walletReferenceType != other.walletReferenceType)
63
			return false;
64
		return true;
65
	}
66
 
67
}