Subversion Repositories SmartDukaan

Rev

Rev 29777 | Rev 29813 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29777 Rev 29811
Line 11... Line 11...
11
import javax.persistence.Table;
11
import javax.persistence.Table;
12
 
12
 
13
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
13
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
14
 
14
 
15
@Entity
15
@Entity
16
@Table(name="dtr.credit_account", schema = "dtr")
16
@Table(name = "dtr.credit_account", schema = "dtr")
17
public class CreditAccount implements Serializable{
17
public class CreditAccount implements Serializable {
18
	
18
 
19
	private static final long serialVersionUID = 1L;
19
	private static final long serialVersionUID = 1L;
20
 
20
 
21
	@Id
21
	@Id
22
	@Column(name="fofo_id", unique=true, updatable=false)
22
	@Column(name = "fofo_id", unique = true, updatable = false)
23
	private int fofoId;
23
	private int fofoId;
24
	
24
 
25
	@Id
25
	@Id
26
	@Enumerated(EnumType.STRING)
26
	@Enumerated(EnumType.STRING)
27
	private Gateway gateway;
27
	private Gateway gateway;
28
	
-
 
29
 
28
 
30
	@Column
29
	@Column
31
	private float sanctionedAmount;
30
	private float sanctionedAmount;
32
	
31
 
33
	@Column
32
	@Column
34
	private float availableAmount;
33
	private float availableAmount;
35
	
34
 
36
	@Column
35
	@Column
37
	private float interestRate;
36
	private float interestRate;
38
	
37
 
39
	@Column
38
	@Column
40
	@Enumerated(EnumType.STRING)
39
	@Enumerated(EnumType.STRING)
41
	private CreditStatus creditStatus;
40
	private CreditStatus creditStatus;
42
	
41
 
43
	@Column
42
	@Column
44
	LocalDateTime updatedOn;
43
	LocalDateTime updatedOn;
-
 
44
 
-
 
45
	@Column
-
 
46
	private boolean active;
-
 
47
 
-
 
48
	@Column
-
 
49
	private String description;
-
 
50
 
-
 
51
	public boolean isActive() {
-
 
52
		return active;
-
 
53
	}
-
 
54
 
-
 
55
	public void setActive(boolean active) {
-
 
56
		this.active = active;
45
	
57
	}
-
 
58
 
-
 
59
	public String getDescription() {
-
 
60
		return description;
-
 
61
	}
-
 
62
 
-
 
63
	public void setDescription(String description) {
-
 
64
		this.description = description;
46
	
65
	}
-
 
66
 
47
	public CreditStatus getCreditStatus() {
67
	public CreditStatus getCreditStatus() {
48
		return creditStatus;
68
		return creditStatus;
49
	}
69
	}
50
 
70
 
51
	public void setCreditStatus(CreditStatus creditStatus) {
71
	public void setCreditStatus(CreditStatus creditStatus) {
Line 58... Line 78...
58
 
78
 
59
	public void setUpdatedOn(LocalDateTime updatedOn) {
79
	public void setUpdatedOn(LocalDateTime updatedOn) {
60
		this.updatedOn = updatedOn;
80
		this.updatedOn = updatedOn;
61
	}
81
	}
62
 
82
 
63
	@Override
-
 
64
	public String toString() {
-
 
65
		return "CreditAccount [fofoId=" + fofoId + ", gateway=" + gateway + ", sanctionedAmount=" + sanctionedAmount
-
 
66
				+ ", availableAmount=" + availableAmount + ", interestRate=" + interestRate + ", creditStatus="
-
 
67
				+ creditStatus + ", updatedOn=" + updatedOn + "]";
-
 
68
	}
-
 
69
 
-
 
70
	public int getFofoId() {
83
	public int getFofoId() {
71
		return fofoId;
84
		return fofoId;
72
	}
85
	}
73
 
86
 
74
	public void setFofoId(int fofoId) {
87
	public void setFofoId(int fofoId) {
Line 109... Line 122...
109
 
122
 
110
	@Override
123
	@Override
111
	public int hashCode() {
124
	public int hashCode() {
112
		final int prime = 31;
125
		final int prime = 31;
113
		int result = 1;
126
		int result = 1;
-
 
127
		result = prime * result + (active ? 1231 : 1237);
114
		result = prime * result + Float.floatToIntBits(availableAmount);
128
		result = prime * result + Float.floatToIntBits(availableAmount);
115
		result = prime * result + ((creditStatus == null) ? 0 : creditStatus.hashCode());
129
		result = prime * result + ((creditStatus == null) ? 0 : creditStatus.hashCode());
-
 
130
		result = prime * result + ((description == null) ? 0 : description.hashCode());
116
		result = prime * result + fofoId;
131
		result = prime * result + fofoId;
117
		result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
132
		result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
118
		result = prime * result + Float.floatToIntBits(interestRate);
133
		result = prime * result + Float.floatToIntBits(interestRate);
119
		result = prime * result + Float.floatToIntBits(sanctionedAmount);
134
		result = prime * result + Float.floatToIntBits(sanctionedAmount);
120
		result = prime * result + ((updatedOn == null) ? 0 : updatedOn.hashCode());
135
		result = prime * result + ((updatedOn == null) ? 0 : updatedOn.hashCode());
Line 128... Line 143...
128
		if (obj == null)
143
		if (obj == null)
129
			return false;
144
			return false;
130
		if (getClass() != obj.getClass())
145
		if (getClass() != obj.getClass())
131
			return false;
146
			return false;
132
		CreditAccount other = (CreditAccount) obj;
147
		CreditAccount other = (CreditAccount) obj;
-
 
148
		if (active != other.active)
-
 
149
			return false;
133
		if (Float.floatToIntBits(availableAmount) != Float.floatToIntBits(other.availableAmount))
150
		if (Float.floatToIntBits(availableAmount) != Float.floatToIntBits(other.availableAmount))
134
			return false;
151
			return false;
135
		if (creditStatus != other.creditStatus)
152
		if (creditStatus != other.creditStatus)
136
			return false;
153
			return false;
-
 
154
		if (description == null) {
-
 
155
			if (other.description != null)
-
 
156
				return false;
-
 
157
		} else if (!description.equals(other.description))
-
 
158
			return false;
137
		if (fofoId != other.fofoId)
159
		if (fofoId != other.fofoId)
138
			return false;
160
			return false;
139
		if (gateway != other.gateway)
161
		if (gateway != other.gateway)
140
			return false;
162
			return false;
141
		if (Float.floatToIntBits(interestRate) != Float.floatToIntBits(other.interestRate))
163
		if (Float.floatToIntBits(interestRate) != Float.floatToIntBits(other.interestRate))
Line 147... Line 169...
147
				return false;
169
				return false;
148
		} else if (!updatedOn.equals(other.updatedOn))
170
		} else if (!updatedOn.equals(other.updatedOn))
149
			return false;
171
			return false;
150
		return true;
172
		return true;
151
	}
173
	}
-
 
174
 
-
 
175
	@Override
-
 
176
	public String toString() {
-
 
177
		return "CreditAccount [fofoId=" + fofoId + ", gateway=" + gateway + ", sanctionedAmount=" + sanctionedAmount
-
 
178
				+ ", availableAmount=" + availableAmount + ", interestRate=" + interestRate + ", creditStatus="
-
 
179
				+ creditStatus + ", updatedOn=" + updatedOn + ", active=" + active + ", description=" + description
-
 
180
				+ "]";
152
	
181
	}
-
 
182
 
153
}
183
}