Subversion Repositories SmartDukaan

Rev

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

Rev 30321 Rev 30399
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
-
 
3
import java.io.File;
3
import java.util.List;
4
import java.util.List;
-
 
5
import java.util.Objects;
4
import java.util.Set;
6
import java.util.Set;
5
 
7
 
6
public class InvoicePdfModel {
8
public class InvoicePdfModel {
7
	private String title;
9
	private String title;
8
	private String auther;
10
	private String auther;
9
	private CustomCustomer customer;
11
	private CustomCustomer customer;
10
	private String customerAddressStateCode;
12
	private String customerAddressStateCode;
-
 
13
	private File qrCode;
-
 
14
	private String irnNumber;
11
 
15
 
12
	public String getCustomerAddressStateCode() {
16
	public String getCustomerAddressStateCode() {
13
		return customerAddressStateCode;
17
		return customerAddressStateCode;
14
	}
18
	}
15
 
19
 
16
	public void setCustomerAddressStateCode(String customerAddressStateCode) {
20
	public void setCustomerAddressStateCode(String customerAddressStateCode) {
17
		this.customerAddressStateCode = customerAddressStateCode;
21
		this.customerAddressStateCode = customerAddressStateCode;
18
	}
22
	}
-
 
23
 
19
	private String partnerAddressStateCode;
24
	private String partnerAddressStateCode;
-
 
25
 
20
	public String getPartnerAddressStateCode() {
26
	public String getPartnerAddressStateCode() {
21
		return partnerAddressStateCode;
27
		return partnerAddressStateCode;
22
	}
28
	}
23
	public void setPartnerAddressStateCode(String partnerAddressStateCode) {
29
	public void setPartnerAddressStateCode(String partnerAddressStateCode) {
24
		this.partnerAddressStateCode = partnerAddressStateCode;
30
		this.partnerAddressStateCode = partnerAddressStateCode;
Line 84... Line 90...
84
		return totalAmount;
90
		return totalAmount;
85
	}
91
	}
86
	public void setTotalAmount(float totalAmount) {
92
	public void setTotalAmount(float totalAmount) {
87
		this.totalAmount = totalAmount;
93
		this.totalAmount = totalAmount;
88
	}
94
	}
89
	@Override
-
 
90
	public int hashCode() {
-
 
91
		final int prime = 31;
-
 
92
		int result = 1;
-
 
93
		result = prime * result + ((auther == null) ? 0 : auther.hashCode());
-
 
94
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
-
 
95
		result = prime * result + ((insurancePolicies == null) ? 0 : insurancePolicies.hashCode());
-
 
96
		result = prime * result + ((invoiceDate == null) ? 0 : invoiceDate.hashCode());
-
 
97
		result = prime * result + ((invoiceNumber == null) ? 0 : invoiceNumber.hashCode());
-
 
98
		result = prime * result + ((orderItems == null) ? 0 : orderItems.hashCode());
-
 
99
		result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
-
 
100
		result = prime * result + ((retailer == null) ? 0 : retailer.hashCode());
-
 
101
		result = prime * result + ((title == null) ? 0 : title.hashCode());
-
 
102
		result = prime * result + ((tncs == null) ? 0 : tncs.hashCode());
-
 
103
		result = prime * result + Float.floatToIntBits(totalAmount);
-
 
104
		return result;
-
 
105
	}
-
 
106
	@Override
-
 
107
	public boolean equals(Object obj) {
-
 
108
		if (this == obj)
-
 
109
			return true;
-
 
110
		if (obj == null)
-
 
111
			return false;
-
 
112
		if (getClass() != obj.getClass())
-
 
113
			return false;
-
 
114
		InvoicePdfModel other = (InvoicePdfModel) obj;
-
 
115
		if (auther == null) {
-
 
116
			if (other.auther != null)
-
 
117
				return false;
-
 
118
		} else if (!auther.equals(other.auther))
-
 
119
			return false;
-
 
120
		if (customer == null) {
-
 
121
			if (other.customer != null)
-
 
122
				return false;
-
 
123
		} else if (!customer.equals(other.customer))
-
 
124
			return false;
-
 
125
		if (insurancePolicies == null) {
-
 
126
			if (other.insurancePolicies != null)
-
 
127
				return false;
-
 
128
		} else if (!insurancePolicies.equals(other.insurancePolicies))
-
 
129
			return false;
-
 
130
		if (invoiceDate == null) {
-
 
131
			if (other.invoiceDate != null)
-
 
132
				return false;
-
 
133
		} else if (!invoiceDate.equals(other.invoiceDate))
-
 
134
			return false;
-
 
135
		if (invoiceNumber == null) {
-
 
136
			if (other.invoiceNumber != null)
-
 
137
				return false;
-
 
138
		} else if (!invoiceNumber.equals(other.invoiceNumber))
-
 
139
			return false;
-
 
140
		if (orderItems == null) {
-
 
141
			if (other.orderItems != null)
-
 
142
				return false;
-
 
143
		} else if (!orderItems.equals(other.orderItems))
-
 
144
			return false;
-
 
145
		if (paymentOptions == null) {
-
 
146
			if (other.paymentOptions != null)
-
 
147
				return false;
-
 
148
		} else if (!paymentOptions.equals(other.paymentOptions))
-
 
149
			return false;
-
 
150
		if (retailer == null) {
-
 
151
			if (other.retailer != null)
-
 
152
				return false;
-
 
153
		} else if (!retailer.equals(other.retailer))
-
 
154
			return false;
-
 
155
		if (title == null) {
-
 
156
			if (other.title != null)
-
 
157
				return false;
-
 
158
		} else if (!title.equals(other.title))
-
 
159
			return false;
-
 
160
		if (tncs == null) {
-
 
161
			if (other.tncs != null)
-
 
162
				return false;
-
 
163
		} else if (!tncs.equals(other.tncs))
-
 
164
			return false;
-
 
165
		if (Float.floatToIntBits(totalAmount) != Float.floatToIntBits(other.totalAmount))
-
 
166
			return false;
-
 
167
		return true;
-
 
168
	}
-
 
169
	@Override
-
 
170
	public String toString() {
-
 
171
		return "PdfModel [title=" + title + ", auther=" + auther + ", customer=" + customer
-
 
172
				+ ", customerAddressStateCode=" + customerAddressStateCode + ", partnerAddressStateCode="
-
 
173
				+ partnerAddressStateCode + ", retailer=" + retailer + ", invoiceNumber=" + invoiceNumber
-
 
174
				+ ", isCancelled=" + isCancelled + ", invoiceDate=" + invoiceDate + ", orderItems=" + orderItems
-
 
175
				+ ", insurancePolicies=" + insurancePolicies + ", paymentOptions=" + paymentOptions + ", tncs=" + tncs
-
 
176
				+ ", totalAmount=" + totalAmount + "]";
-
 
177
	}
95
 
178
	public String getInvoiceDate() {
96
	public String getInvoiceDate() {
179
		return invoiceDate;
97
		return invoiceDate;
180
	}
98
	}
181
	public void setInvoiceDate(String invoiceDate) {
99
	public void setInvoiceDate(String invoiceDate) {
182
		this.invoiceDate = invoiceDate;
100
		this.invoiceDate = invoiceDate;
183
	}
101
	}
184
	public List<String> getTncs() {
102
	public List<String> getTncs() {
185
		return tncs;
103
		return tncs;
186
	}
104
	}
-
 
105
 
187
	public void setTncs(List<String> tncs) {
106
	public void setTncs(List<String> tncs) {
188
		this.tncs = tncs;
107
		this.tncs = tncs;
189
	}
108
	}
-
 
109
 
190
	public List<CustomPaymentOption> getPaymentOptions() {
110
	public List<CustomPaymentOption> getPaymentOptions() {
191
		return paymentOptions;
111
		return paymentOptions;
192
	}
112
	}
-
 
113
 
193
	public void setPaymentOptions(List<CustomPaymentOption> paymentOptions) {
114
	public void setPaymentOptions(List<CustomPaymentOption> paymentOptions) {
194
		this.paymentOptions = paymentOptions;
115
		this.paymentOptions = paymentOptions;
195
	}
116
	}
-
 
117
 
-
 
118
	@Override
-
 
119
	public String toString() {
-
 
120
		return "InvoicePdfModel{" +
-
 
121
				"title='" + title + '\'' +
-
 
122
				", auther='" + auther + '\'' +
-
 
123
				", customer=" + customer +
-
 
124
				", customerAddressStateCode='" + customerAddressStateCode + '\'' +
-
 
125
				", qrCode='" + qrCode + '\'' +
-
 
126
				", irnNumber='" + irnNumber + '\'' +
-
 
127
				", partnerAddressStateCode='" + partnerAddressStateCode + '\'' +
-
 
128
				", retailer=" + retailer +
-
 
129
				", invoiceNumber='" + invoiceNumber + '\'' +
-
 
130
				", isCancelled=" + isCancelled +
-
 
131
				", invoiceDate='" + invoiceDate + '\'' +
-
 
132
				", orderItems=" + orderItems +
-
 
133
				", insurancePolicies=" + insurancePolicies +
-
 
134
				", paymentOptions=" + paymentOptions +
-
 
135
				", tncs=" + tncs +
-
 
136
				", totalAmount=" + totalAmount +
-
 
137
				'}';
-
 
138
	}
-
 
139
 
-
 
140
	@Override
-
 
141
	public boolean equals(Object o) {
-
 
142
		if (this == o) return true;
-
 
143
		if (o == null || getClass() != o.getClass()) return false;
-
 
144
		InvoicePdfModel that = (InvoicePdfModel) o;
196
	
145
		return isCancelled == that.isCancelled && Float.compare(that.totalAmount, totalAmount) == 0 && Objects.equals(title, that.title) && Objects.equals(auther, that.auther) && Objects.equals(customer, that.customer) && Objects.equals(customerAddressStateCode, that.customerAddressStateCode) && Objects.equals(qrCode, that.qrCode) && Objects.equals(irnNumber, that.irnNumber) && Objects.equals(partnerAddressStateCode, that.partnerAddressStateCode) && Objects.equals(retailer, that.retailer) && Objects.equals(invoiceNumber, that.invoiceNumber) && Objects.equals(invoiceDate, that.invoiceDate) && Objects.equals(orderItems, that.orderItems) && Objects.equals(insurancePolicies, that.insurancePolicies) && Objects.equals(paymentOptions, that.paymentOptions) && Objects.equals(tncs, that.tncs);
-
 
146
	}
-
 
147
 
-
 
148
	@Override
-
 
149
	public int hashCode() {
-
 
150
		return Objects.hash(title, auther, customer, customerAddressStateCode, qrCode, irnNumber, partnerAddressStateCode, retailer, invoiceNumber, isCancelled, invoiceDate, orderItems, insurancePolicies, paymentOptions, tncs, totalAmount);
-
 
151
	}
-
 
152
 
-
 
153
	public File getQrCode() {
-
 
154
		return qrCode;
-
 
155
	}
-
 
156
 
-
 
157
	public void setQrCode(File qrCode) {
-
 
158
		this.qrCode = qrCode;
-
 
159
	}
-
 
160
 
-
 
161
	public String getIrnNumber() {
-
 
162
		return irnNumber;
197
	
163
	}
-
 
164
 
-
 
165
	public void setIrnNumber(String irnNumber) {
-
 
166
		this.irnNumber = irnNumber;
198
	
167
	}
199
}
168
}