Subversion Repositories SmartDukaan

Rev

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

Rev 30399 Rev 32246
Line 4... Line 4...
4
import java.util.List;
4
import java.util.List;
5
import java.util.Objects;
5
import java.util.Objects;
6
import java.util.Set;
6
import java.util.Set;
7
 
7
 
8
public class InvoicePdfModel {
8
public class InvoicePdfModel {
9
	private String title;
9
    private String title;
10
	private String auther;
10
    private String auther;
11
	private CustomCustomer customer;
11
    private CustomCustomer customer;
12
	private String customerAddressStateCode;
12
    private String customerAddressStateCode;
13
	private File qrCode;
13
    private File qrCode;
14
	private String irnNumber;
14
    private String irnNumber;
15
 
15
 
16
	public String getCustomerAddressStateCode() {
16
 
17
		return customerAddressStateCode;
17
    private CustomRetailer retailer;
18
	}
18
    private String invoiceNumber;
19
 
19
    private boolean isCancelled;
20
	public void setCustomerAddressStateCode(String customerAddressStateCode) {
20
 
21
		this.customerAddressStateCode = customerAddressStateCode;
21
    private String invoiceDate;
22
	}
22
    private Set<CustomOrderItem> orderItems;
23
 
23
    private Set<CustomInsurancePolicy> insurancePolicies;
24
	private String partnerAddressStateCode;
24
    private List<CustomPaymentOption> paymentOptions;
25
 
25
    private List<String> tncs;
26
	public String getPartnerAddressStateCode() {
26
    private float totalAmount;
27
		return partnerAddressStateCode;
27
 
28
	}
28
    public boolean isCancelled() {
29
	public void setPartnerAddressStateCode(String partnerAddressStateCode) {
29
        return isCancelled;
30
		this.partnerAddressStateCode = partnerAddressStateCode;
30
    }
31
	}
31
 
32
	private CustomRetailer retailer;
32
    public void setCancelled(boolean isCancelled) {
33
	private String invoiceNumber;
33
        this.isCancelled = isCancelled;
34
	private boolean isCancelled;
34
    }
35
	public boolean isCancelled() {
35
 
36
		return isCancelled;
36
    public String getCustomerAddressStateCode() {
37
	}
37
        return customerAddressStateCode;
38
	public void setCancelled(boolean isCancelled) {
38
    }
39
		this.isCancelled = isCancelled;
39
 
40
	}
40
    public void setCustomerAddressStateCode(String customerAddressStateCode) {
41
	private String invoiceDate;
41
        this.customerAddressStateCode = customerAddressStateCode;
42
	private Set<CustomOrderItem> orderItems;
42
    }
43
	private Set<CustomInsurancePolicy> insurancePolicies;
43
 
44
	private List<CustomPaymentOption> paymentOptions;
44
    private String partnerAddressStateCode;
45
	private List<String> tncs;
45
 
46
	private float totalAmount;
46
    public String getPartnerAddressStateCode() {
47
	public String getTitle() {
47
        return partnerAddressStateCode;
48
		return title;
48
    }
49
	}
49
 
50
	public void setTitle(String title) {
50
    public void setPartnerAddressStateCode(String partnerAddressStateCode) {
51
		this.title = title;
51
        this.partnerAddressStateCode = partnerAddressStateCode;
52
	}
52
    }
53
	public String getAuther() {
53
 
54
		return auther;
54
    public String getTitle() {
55
	}
55
        return title;
56
	public void setAuther(String auther) {
56
    }
57
		this.auther = auther;
57
 
58
	}
58
    public void setTitle(String title) {
59
	public CustomCustomer getCustomer() {
59
        this.title = title;
60
		return customer;
60
    }
61
	}
61
 
62
	public void setCustomer(CustomCustomer customer) {
62
    public String getAuther() {
63
		this.customer = customer;
63
        return auther;
64
	}
64
    }
65
	public CustomRetailer getRetailer() {
65
 
66
		return retailer;
66
    public void setAuther(String auther) {
67
	}
67
        this.auther = auther;
68
	public void setRetailer(CustomRetailer retailer) {
68
    }
69
		this.retailer = retailer;
69
 
70
	}
70
    public CustomCustomer getCustomer() {
71
	public String getInvoiceNumber() {
71
        return customer;
72
		return invoiceNumber;
72
    }
73
	}
73
 
74
	public void setInvoiceNumber(String invoiceNumber) {
74
    public void setCustomer(CustomCustomer customer) {
75
		this.invoiceNumber = invoiceNumber;
75
        this.customer = customer;
76
	}
76
    }
77
	public Set<CustomOrderItem> getOrderItems() {
77
 
78
		return orderItems;
78
    public CustomRetailer getRetailer() {
79
	}
79
        return retailer;
80
	public void setOrderItems(Set<CustomOrderItem> orderItems) {
80
    }
81
		this.orderItems = orderItems;
81
 
82
	}
82
    public void setRetailer(CustomRetailer retailer) {
83
	public Set<CustomInsurancePolicy> getInsurancePolicies() {
83
        this.retailer = retailer;
84
		return insurancePolicies;
84
    }
85
	}
85
 
86
	public void setInsurancePolicies(Set<CustomInsurancePolicy> insurancePolicies) {
86
    public String getInvoiceNumber() {
87
		this.insurancePolicies = insurancePolicies;
87
        return invoiceNumber;
88
	}
88
    }
89
	public float getTotalAmount() {
89
 
90
		return totalAmount;
90
    public void setInvoiceNumber(String invoiceNumber) {
91
	}
91
        this.invoiceNumber = invoiceNumber;
92
	public void setTotalAmount(float totalAmount) {
92
    }
93
		this.totalAmount = totalAmount;
93
 
94
	}
94
    public Set<CustomOrderItem> getOrderItems() {
95
 
95
        return orderItems;
96
	public String getInvoiceDate() {
96
    }
97
		return invoiceDate;
97
 
98
	}
98
    public void setOrderItems(Set<CustomOrderItem> orderItems) {
99
	public void setInvoiceDate(String invoiceDate) {
99
        this.orderItems = orderItems;
100
		this.invoiceDate = invoiceDate;
100
    }
101
	}
101
 
102
	public List<String> getTncs() {
102
    public Set<CustomInsurancePolicy> getInsurancePolicies() {
103
		return tncs;
103
        return insurancePolicies;
104
	}
104
    }
105
 
105
 
106
	public void setTncs(List<String> tncs) {
106
    public void setInsurancePolicies(Set<CustomInsurancePolicy> insurancePolicies) {
107
		this.tncs = tncs;
107
        this.insurancePolicies = insurancePolicies;
108
	}
108
    }
109
 
109
 
110
	public List<CustomPaymentOption> getPaymentOptions() {
110
    public float getTotalAmount() {
111
		return paymentOptions;
111
        return totalAmount;
112
	}
112
    }
113
 
113
 
114
	public void setPaymentOptions(List<CustomPaymentOption> paymentOptions) {
114
    public void setTotalAmount(float totalAmount) {
115
		this.paymentOptions = paymentOptions;
115
        this.totalAmount = totalAmount;
116
	}
116
    }
117
 
117
 
118
	@Override
118
    public String getInvoiceDate() {
119
	public String toString() {
119
        return invoiceDate;
120
		return "InvoicePdfModel{" +
120
    }
121
				"title='" + title + '\'' +
121
 
122
				", auther='" + auther + '\'' +
122
    public void setInvoiceDate(String invoiceDate) {
123
				", customer=" + customer +
123
        this.invoiceDate = invoiceDate;
124
				", customerAddressStateCode='" + customerAddressStateCode + '\'' +
124
    }
125
				", qrCode='" + qrCode + '\'' +
125
 
126
				", irnNumber='" + irnNumber + '\'' +
126
    public List<String> getTncs() {
127
				", partnerAddressStateCode='" + partnerAddressStateCode + '\'' +
127
        return tncs;
128
				", retailer=" + retailer +
128
    }
129
				", invoiceNumber='" + invoiceNumber + '\'' +
129
 
130
				", isCancelled=" + isCancelled +
130
    public void setTncs(List<String> tncs) {
131
				", invoiceDate='" + invoiceDate + '\'' +
131
        this.tncs = tncs;
132
				", orderItems=" + orderItems +
132
    }
133
				", insurancePolicies=" + insurancePolicies +
133
 
134
				", paymentOptions=" + paymentOptions +
134
    public List<CustomPaymentOption> getPaymentOptions() {
135
				", tncs=" + tncs +
135
        return paymentOptions;
136
				", totalAmount=" + totalAmount +
136
    }
137
				'}';
137
 
138
	}
138
    public void setPaymentOptions(List<CustomPaymentOption> paymentOptions) {
139
 
139
        this.paymentOptions = paymentOptions;
140
	@Override
140
    }
141
	public boolean equals(Object o) {
141
 
142
		if (this == o) return true;
142
    @Override
143
		if (o == null || getClass() != o.getClass()) return false;
143
    public String toString() {
144
		InvoicePdfModel that = (InvoicePdfModel) o;
144
        return "InvoicePdfModel{" + "title='" + title + '\'' + ", auther='" + auther + '\'' + ", customer=" + customer + ", customerAddressStateCode='" + customerAddressStateCode + '\'' + ", qrCode='" + qrCode + '\'' + ", irnNumber='" + irnNumber + '\'' + ", partnerAddressStateCode='" + partnerAddressStateCode + '\'' + ", retailer=" + retailer + ", invoiceNumber='" + invoiceNumber + '\'' + ", isCancelled=" + isCancelled + ", invoiceDate='" + invoiceDate + '\'' + ", orderItems=" + orderItems + ", insurancePolicies=" + insurancePolicies + ", paymentOptions=" + paymentOptions + ", tncs=" + tncs + ", totalAmount=" + totalAmount + '}';
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);
145
    }
146
	}
146
 
147
 
147
    @Override
148
	@Override
148
    public boolean equals(Object o) {
149
	public int hashCode() {
149
        if (this == o) return true;
150
		return Objects.hash(title, auther, customer, customerAddressStateCode, qrCode, irnNumber, partnerAddressStateCode, retailer, invoiceNumber, isCancelled, invoiceDate, orderItems, insurancePolicies, paymentOptions, tncs, totalAmount);
150
        if (o == null || getClass() != o.getClass()) return false;
151
	}
151
        InvoicePdfModel that = (InvoicePdfModel) o;
152
 
152
        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);
153
	public File getQrCode() {
153
    }
154
		return qrCode;
154
 
155
	}
155
    @Override
156
 
156
    public int hashCode() {
157
	public void setQrCode(File qrCode) {
157
        return Objects.hash(title, auther, customer, customerAddressStateCode, qrCode, irnNumber, partnerAddressStateCode, retailer, invoiceNumber, isCancelled, invoiceDate, orderItems, insurancePolicies, paymentOptions, tncs, totalAmount);
158
		this.qrCode = qrCode;
158
    }
159
	}
159
 
160
 
160
    public File getQrCode() {
161
	public String getIrnNumber() {
161
        return qrCode;
162
		return irnNumber;
162
    }
163
	}
163
 
164
 
164
    public void setQrCode(File qrCode) {
165
	public void setIrnNumber(String irnNumber) {
165
        this.qrCode = qrCode;
166
		this.irnNumber = irnNumber;
166
    }
167
	}
167
 
-
 
168
    public String getIrnNumber() {
-
 
169
        return irnNumber;
-
 
170
    }
-
 
171
 
-
 
172
    public void setIrnNumber(String irnNumber) {
-
 
173
        this.irnNumber = irnNumber;
-
 
174
    }
168
}
175
}