Subversion Repositories SmartDukaan

Rev

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

Rev 22216 Rev 22243
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.dtr;
1
package com.spice.profitmandi.dao.entity.dtr;
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
-
 
4
import java.time.LocalDate;
4
import java.time.LocalDateTime;
5
import java.time.LocalDateTime;
5
 
6
 
-
 
7
import javax.persistence.CascadeType;
6
import javax.persistence.Column;
8
import javax.persistence.Column;
7
import javax.persistence.Convert;
9
import javax.persistence.Convert;
8
import javax.persistence.Entity;
10
import javax.persistence.Entity;
-
 
11
import javax.persistence.FetchType;
9
import javax.persistence.GeneratedValue;
12
import javax.persistence.GeneratedValue;
10
import javax.persistence.GenerationType;
13
import javax.persistence.GenerationType;
11
import javax.persistence.Id;
14
import javax.persistence.Id;
-
 
15
import javax.persistence.JoinColumn;
-
 
16
import javax.persistence.ManyToOne;
12
import javax.persistence.Table;
17
import javax.persistence.Table;
13
 
18
 
14
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
19
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
15
 
20
 
16
/**
21
/**
Line 61... Line 66...
61
	private String policyNumber;
66
	private String policyNumber;
62
	
67
	
63
	@Column(name="provider_id")
68
	@Column(name="provider_id")
64
	private int providerId;
69
	private int providerId;
65
	
70
	
-
 
71
	@Column(name = "customer_first_name")
-
 
72
	private String customerFirstName;
-
 
73
	
-
 
74
	@Column(name = "customer_last_name")
-
 
75
	private String customerLastName;
-
 
76
	
-
 
77
	@Column(name = "customer_mobile_number")
-
 
78
	private String customerMobileNumber;
-
 
79
	
-
 
80
	@Column(name = "customer_email_id")
-
 
81
	private String customerEmailId;
-
 
82
	
-
 
83
	@Column(name = "customer_date_of_birth")
-
 
84
	private LocalDate customerDateOfBirth = LocalDate.now();
-
 
85
	
-
 
86
	@Column(name = "customer_address1")
-
 
87
	private String customerAddress1;
-
 
88
	
-
 
89
	@Column(name = "customer_address2")
-
 
90
	private String customerAddress2;
-
 
91
	
-
 
92
	@Column(name = "customer_city")
-
 
93
	private String customerCity;
-
 
94
	
-
 
95
	@Column(name = "customer_pin_code")
-
 
96
	private String customerPinCode;
-
 
97
	
-
 
98
	@Column(name = "customer_state")
-
 
99
	private String customerState;
-
 
100
	
-
 
101
	@Column(name = "posted", columnDefinition = "tinyint(1) default 0")
-
 
102
	private boolean posted;
-
 
103
	
66
	@Convert(converter = LocalDateTimeAttributeConverter.class)
104
	@Convert(converter = LocalDateTimeAttributeConverter.class)
67
	@Column(name="create_timestamp", updatable = false)
105
	@Column(name="create_timestamp", updatable = false)
68
	private LocalDateTime createTimestamp = LocalDateTime.now();
106
	private LocalDateTime createTimestamp = LocalDateTime.now();
69
	
107
	
70
	@Convert(converter = LocalDateTimeAttributeConverter.class)
108
	@Convert(converter = LocalDateTimeAttributeConverter.class)
71
	@Column(name="invoice_creation_timestamp")
109
	@Column(name="invoice_creation_timestamp")
72
	private LocalDateTime invoiceCreationTimestamp = LocalDateTime.now();
110
	private LocalDateTime invoiceCreationTimestamp = LocalDateTime.now();
-
 
111
	
-
 
112
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
-
 
113
	@JoinColumn(name="provider_id",insertable=false,updatable=false,nullable=false, referencedColumnName="id")
-
 
114
	private InsuranceProvider insuranceProvider;
-
 
115
	
73
 
116
 
74
	public int getId() {
117
	public int getId() {
75
		return id;
118
		return id;
76
	}
119
	}
77
 
120
 
Line 153... Line 196...
153
	}
196
	}
154
 
197
 
155
	public void setProviderId(int providerId) {
198
	public void setProviderId(int providerId) {
156
		this.providerId = providerId;
199
		this.providerId = providerId;
157
	}
200
	}
-
 
201
	
-
 
202
	public String getCustomerFirstName() {
-
 
203
		return customerFirstName;
-
 
204
	}
-
 
205
	public void setCustomerFirstName(String customerFirstName) {
-
 
206
		this.customerFirstName = customerFirstName;
-
 
207
	}
-
 
208
	public String getCustomerLastName() {
-
 
209
		return customerLastName;
-
 
210
	}
-
 
211
	public void setCustomerLastName(String customerLastName) {
-
 
212
		this.customerLastName = customerLastName;
-
 
213
	}
-
 
214
	public String getCustomerMobileNumber() {
-
 
215
		return customerMobileNumber;
-
 
216
	}
-
 
217
	public void setCustomerMobileNumber(String customerMobileNumber) {
-
 
218
		this.customerMobileNumber = customerMobileNumber;
-
 
219
	}
-
 
220
	public String getCustomerEmailId() {
-
 
221
		return customerEmailId;
-
 
222
	}
-
 
223
	public void setCustomerEmailId(String customerEmailId) {
-
 
224
		this.customerEmailId = customerEmailId;
-
 
225
	}
-
 
226
	public LocalDate getCustomerDateOfBirth() {
-
 
227
		return customerDateOfBirth;
-
 
228
	}
-
 
229
	public void setCustomerDateOfBirth(LocalDate customerDateOfBirth) {
-
 
230
		this.customerDateOfBirth = customerDateOfBirth;
-
 
231
	}
-
 
232
	public String getCustomerAddress1() {
-
 
233
		return customerAddress1;
-
 
234
	}
-
 
235
	public void setCustomerAddress1(String customerAddress1) {
-
 
236
		this.customerAddress1 = customerAddress1;
-
 
237
	}
-
 
238
	public String getCustomerAddress2() {
-
 
239
		return customerAddress2;
-
 
240
	}
-
 
241
	public void setCustomerAddress2(String customerAddress2) {
-
 
242
		this.customerAddress2 = customerAddress2;
-
 
243
	}
-
 
244
	public String getCustomerCity() {
-
 
245
		return customerCity;
-
 
246
	}
-
 
247
	public void setCustomerCity(String customerCity) {
-
 
248
		this.customerCity = customerCity;
-
 
249
	}
-
 
250
	public String getCustomerPinCode() {
-
 
251
		return customerPinCode;
-
 
252
	}
-
 
253
	public void setCustomerPinCode(String customerPinCode) {
-
 
254
		this.customerPinCode = customerPinCode;
-
 
255
	}
-
 
256
	public String getCustomerState() {
-
 
257
		return customerState;
-
 
258
	}
-
 
259
	public void setCustomerState(String customerState) {
-
 
260
		this.customerState = customerState;
-
 
261
	}
158
 
262
 
-
 
263
	public boolean isPosted() {
-
 
264
		return posted;
-
 
265
	}
-
 
266
	
-
 
267
	public void setPosted(boolean posted) {
-
 
268
		this.posted = posted;
-
 
269
	}
159
	public LocalDateTime getCreateTimestamp() {
270
	public LocalDateTime getCreateTimestamp() {
160
		return createTimestamp;
271
		return createTimestamp;
161
	}
272
	}
162
 
273
 
163
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
274
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
Line 170... Line 281...
170
 
281
 
171
	public void setInvoiceCreationTimestamp(LocalDateTime invoiceCreationTimestamp) {
282
	public void setInvoiceCreationTimestamp(LocalDateTime invoiceCreationTimestamp) {
172
		this.invoiceCreationTimestamp = invoiceCreationTimestamp;
283
		this.invoiceCreationTimestamp = invoiceCreationTimestamp;
173
	}
284
	}
174
	
285
	
-
 
286
	public InsuranceProvider getInsuranceProvider() {
-
 
287
		return insuranceProvider;
-
 
288
	}
175
	
289
	
-
 
290
	public void setInsuranceProvider(InsuranceProvider insuranceProvider) {
-
 
291
		this.insuranceProvider = insuranceProvider;
-
 
292
	}
176
 
293
 
177
	@Override
294
	@Override
178
	public int hashCode() {
295
	public int hashCode() {
179
		final int prime = 31;
296
		final int prime = 31;
180
		int result = 1;
297
		int result = 1;
Line 199... Line 316...
199
	@Override
316
	@Override
200
	public String toString() {
317
	public String toString() {
201
		return "InsurancePolicy [id=" + id + ", invoiceNumber=" + invoiceNumber + ", retailerId=" + retailerId
318
		return "InsurancePolicy [id=" + id + ", invoiceNumber=" + invoiceNumber + ", retailerId=" + retailerId
202
				+ ", purchaseAmount=" + purchaseAmount + ", saleAmount=" + saleAmount + ", sellingPrice=" + sellingPrice
319
				+ ", purchaseAmount=" + purchaseAmount + ", saleAmount=" + saleAmount + ", sellingPrice=" + sellingPrice
203
				+ ", serialNumber=" + serialNumber + ", modelName=" + modelName + ", brand=" + brand + ", policyNumber="
320
				+ ", serialNumber=" + serialNumber + ", modelName=" + modelName + ", brand=" + brand + ", policyNumber="
204
				+ policyNumber + ", providerId=" + providerId + ", createTimestamp=" + createTimestamp
321
				+ policyNumber + ", providerId=" + providerId + ", customerFirstName=" + customerFirstName
-
 
322
				+ ", customerLastName=" + customerLastName + ", customerMobileNumber=" + customerMobileNumber
-
 
323
				+ ", customerEmailId=" + customerEmailId + ", customerDateOfBirth=" + customerDateOfBirth
-
 
324
				+ ", customerAddress1=" + customerAddress1 + ", customerAddress2=" + customerAddress2
-
 
325
				+ ", customerCity=" + customerCity + ", customerPinCode=" + customerPinCode + ", customerState="
-
 
326
				+ customerState + ", createTimestamp=" + createTimestamp + ", invoiceCreationTimestamp="
205
				+ ", invoiceCreationTimestamp=" + invoiceCreationTimestamp + "]";
327
				+ invoiceCreationTimestamp + ", insuranceProvider=" + insuranceProvider + "]";
206
	}
328
	}
207
 
329
 
208
	
330
	 
209
	    
-
 
210
}
331
}
211
332