Subversion Repositories SmartDukaan

Rev

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

Rev 30635 Rev 31773
Line 4... Line 4...
4
import javax.persistence.Entity;
4
import javax.persistence.Entity;
5
import javax.persistence.Id;
5
import javax.persistence.Id;
6
import javax.persistence.Table;
6
import javax.persistence.Table;
7
import java.io.Serializable;
7
import java.io.Serializable;
8
import java.time.LocalDateTime;
8
import java.time.LocalDateTime;
-
 
9
import java.util.Objects;
9
 
10
 
10
/**
11
/**
11
 * This class basically contains cart details
12
 * This class basically contains cart details
12
 * 
13
 * 
13
 * @author ashikali
14
 * @author ashikali
Line 24... Line 25...
24
	@Column(name="item_id")
25
	@Column(name="item_id")
25
	private int itemId;
26
	private int itemId;
26
	
27
	
27
	@Column(name="quantity")
28
	@Column(name="quantity")
28
	private int quantity;
29
	private int quantity;
-
 
30
 
-
 
31
	@Override
-
 
32
	public boolean equals(Object o) {
-
 
33
		if (this == o) return true;
-
 
34
		if (o == null || getClass() != o.getClass()) return false;
-
 
35
		CartLine cartLine = (CartLine) o;
29
	
36
		return cartId == cartLine.cartId && itemId == cartLine.itemId && quantity == cartLine.quantity && availability == cartLine.availability && lineStatus == cartLine.lineStatus && Float.compare(cartLine.actualPrice, actualPrice) == 0 && insurer == cartLine.insurer && dataProtectionInsurer == cartLine.dataProtectionInsurer && Float.compare(cartLine.dataProtectionAmount, dataProtectionAmount) == 0 && Objects.equals(estimate, cartLine.estimate) && Objects.equals(createTimestamp, cartLine.createTimestamp) && Objects.equals(updateTimestapm, cartLine.updateTimestapm) && Objects.equals(discountedPrice, cartLine.discountedPrice) && Objects.equals(insuranceAmount, cartLine.insuranceAmount) && Objects.equals(dealText, cartLine.dealText);
-
 
37
	}
-
 
38
 
-
 
39
	@Override
-
 
40
	public int hashCode() {
-
 
41
		return Objects.hash(cartId, itemId, quantity, availability, lineStatus, estimate, createTimestamp, updateTimestapm, actualPrice, discountedPrice, insurer, insuranceAmount, dataProtectionInsurer, dataProtectionAmount, dealText);
-
 
42
	}
-
 
43
 
-
 
44
	@Override
-
 
45
	public String toString() {
-
 
46
		return "CartLine{" +
-
 
47
				"cartId=" + cartId +
-
 
48
				", itemId=" + itemId +
-
 
49
				", quantity=" + quantity +
-
 
50
				", availability=" + availability +
-
 
51
				", lineStatus=" + lineStatus +
-
 
52
				", estimate=" + estimate +
-
 
53
				", createTimestamp=" + createTimestamp +
-
 
54
				", updateTimestapm=" + updateTimestapm +
-
 
55
				", actualPrice=" + actualPrice +
-
 
56
				", discountedPrice=" + discountedPrice +
-
 
57
				", insurer=" + insurer +
-
 
58
				", insuranceAmount=" + insuranceAmount +
-
 
59
				", dataProtectionInsurer=" + dataProtectionInsurer +
-
 
60
				", dataProtectionAmount=" + dataProtectionAmount +
-
 
61
				", dealText='" + dealText + '\'' +
-
 
62
				'}';
-
 
63
	}
-
 
64
 
-
 
65
	public int getAvailability() {
-
 
66
		return availability;
-
 
67
	}
-
 
68
 
-
 
69
	public void setAvailability(int availability) {
-
 
70
		this.availability = availability;
-
 
71
	}
-
 
72
 
-
 
73
	@Column(name="availability")
-
 
74
	private int availability;
-
 
75
 
30
	@Column(name="line_status")
76
	@Column(name="line_status")
31
	private int lineStatus;
77
	private int lineStatus;
32
 
78
 
33
	@Column(name = "estimate")
79
	@Column(name = "estimate")
34
	private Integer estimate;
80
	private Integer estimate;
Line 58... Line 104...
58
	private float dataProtectionAmount;
104
	private float dataProtectionAmount;
59
 
105
 
60
	@Column(name="dealText")
106
	@Column(name="dealText")
61
	private String dealText;
107
	private String dealText;
62
 
108
 
63
	@Override
-
 
64
	public String toString() {
-
 
65
		return "CartLine [cartId=" + cartId + ", itemId=" + itemId + ", quantity=" + quantity + ", lineStatus="
-
 
66
				+ lineStatus + ", estimate=" + estimate + ", createTimestamp=" + createTimestamp + ", updateTimestapm="
-
 
67
				+ updateTimestapm + ", actualPrice=" + actualPrice + ", discountedPrice=" + discountedPrice
-
 
68
				+ ", insurer=" + insurer + ", insuranceAmount=" + insuranceAmount + ", dataProtectionInsurer="
-
 
69
				+ dataProtectionInsurer + ", dataProtectionAmount=" + dataProtectionAmount + ", dealText=" + dealText
-
 
70
				+ "]";
-
 
71
	}
-
 
72
 
-
 
73
	public int getCartId() {
109
	public int getCartId() {
74
		return cartId;
110
		return cartId;
75
	}
111
	}
76
 
112
 
77
	public void setCartId(int cartId) {
113
	public void setCartId(int cartId) {
Line 183... Line 219...
183
 
219
 
184
	public void setDealText(String dealText) {
220
	public void setDealText(String dealText) {
185
		this.dealText = dealText;
221
		this.dealText = dealText;
186
	}
222
	}
187
 
223
 
188
	@Override
-
 
189
	public int hashCode() {
-
 
190
		final int prime = 31;
-
 
191
		int result = 1;
-
 
192
		result = prime * result + cartId;
-
 
193
		result = prime * result + itemId;
-
 
194
		return result;
-
 
195
	}
-
 
196
 
224
 
197
	@Override
-
 
198
	public boolean equals(Object obj) {
-
 
199
		if (this == obj)
-
 
200
			return true;
-
 
201
		if (obj == null)
-
 
202
			return false;
-
 
203
		if (getClass() != obj.getClass())
-
 
204
			return false;
-
 
205
		CartLine other = (CartLine) obj;
-
 
206
		if (cartId != other.cartId)
-
 
207
			return false;
-
 
208
		if (itemId != other.itemId)
-
 
209
			return false;
-
 
210
		return true;
-
 
211
	}
-
 
212
	
-
 
213
	
-
 
214
}
225
}