Subversion Repositories SmartDukaan

Rev

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

Rev 22243 Rev 22859
Line 53... Line 53...
53
	private float totalAmount;
53
	private float totalAmount;
54
	
54
	
55
	@Column(name = "invoice_number", length = 50)
55
	@Column(name = "invoice_number", length = 50)
56
	private String invoiceNumber;
56
	private String invoiceNumber;
57
	
57
	
-
 
58
	@Column(name = "cashback")
-
 
59
	private float cashback;
-
 
60
	
58
	@Convert(converter = LocalDateTimeAttributeConverter.class)
61
	@Convert(converter = LocalDateTimeAttributeConverter.class)
59
	@Column(name = "create_timestamp")
62
	@Column(name = "create_timestamp")
60
	private LocalDateTime createTimestamp = LocalDateTime.now();
63
	private LocalDateTime createTimestamp = LocalDateTime.now();
61
	
64
	
62
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
65
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
63
	@JoinColumn(name="order_id",insertable=false,updatable=false,nullable=false)
66
	@JoinColumn(name="order_id",insertable=false,updatable=false,nullable=false)
64
	private List<FofoLineItem> fofoLineItem;	
67
	private List<FofoOrderItem> fofoLineItem;	
65
	
68
	
66
	
69
	
67
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
70
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
68
	@JoinColumn(name="order_id",insertable=false,updatable=false,nullable=false)
71
	@JoinColumn(name="order_id",insertable=false,updatable=false,nullable=false)
69
	private List<PaymentOption> paymentOption;	
72
	private List<PaymentOption> paymentOption;	
Line 72... Line 75...
72
		return paymentOption;
75
		return paymentOption;
73
	}
76
	}
74
	public void setPaymentOption(List<PaymentOption> paymentOption) {
77
	public void setPaymentOption(List<PaymentOption> paymentOption) {
75
		this.paymentOption = paymentOption;
78
		this.paymentOption = paymentOption;
76
	}
79
	}
77
	public List<FofoLineItem> getFofoLineItem() {
80
	public List<FofoOrderItem> getFofoLineItem() {
78
		return fofoLineItem;
81
		return fofoLineItem;
79
	}
82
	}
80
	public void setFofoLineItem(List<FofoLineItem> fofoLineItem) {
83
	public void setFofoLineItem(List<FofoOrderItem> fofoLineItem) {
81
		this.fofoLineItem = fofoLineItem;
84
		this.fofoLineItem = fofoLineItem;
82
	}
85
	}
83
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
86
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
84
	@JoinColumn(name="customer_id",insertable=false,updatable=false,nullable=false, referencedColumnName="id")
87
	@JoinColumn(name="customer_id",insertable=false,updatable=false,nullable=false, referencedColumnName="id")
85
	private Customer customer;	
88
	private Customer customer;	
Line 134... Line 137...
134
		return invoiceNumber;
137
		return invoiceNumber;
135
	}
138
	}
136
	public void setInvoiceNumber(String invoiceNumber) {
139
	public void setInvoiceNumber(String invoiceNumber) {
137
		this.invoiceNumber = invoiceNumber;
140
		this.invoiceNumber = invoiceNumber;
138
	}
141
	}
-
 
142
	public float getCashback() {
-
 
143
		return cashback;
-
 
144
	}
-
 
145
	public void setCashback(float cashback) {
-
 
146
		this.cashback = cashback;
-
 
147
	}
139
	public LocalDateTime getCreateTimestamp() {
148
	public LocalDateTime getCreateTimestamp() {
140
		return createTimestamp;
149
		return createTimestamp;
141
	}
150
	}
142
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
151
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
143
		this.createTimestamp = createTimestamp;
152
		this.createTimestamp = createTimestamp;
Line 153... Line 162...
153
		final int prime = 31;
162
		final int prime = 31;
154
		int result = 1;
163
		int result = 1;
155
		result = prime * result + id;
164
		result = prime * result + id;
156
		return result;
165
		return result;
157
	}
166
	}
-
 
167
	
158
	@Override
168
	@Override
159
	public boolean equals(Object obj) {
169
	public boolean equals(Object obj) {
160
		if (this == obj)
170
		if (this == obj)
161
			return true;
171
			return true;
162
		if (obj == null)
172
		if (obj == null)
Line 166... Line 176...
166
		FofoOrder other = (FofoOrder) obj;
176
		FofoOrder other = (FofoOrder) obj;
167
		if (id != other.id)
177
		if (id != other.id)
168
			return false;
178
			return false;
169
		return true;
179
		return true;
170
	}
180
	}
-
 
181
	
171
	@Override
182
	@Override
172
	public String toString() {
183
	public String toString() {
173
		return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
184
		return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
174
				+ customerAddressId + ", totalAmount=" + totalAmount + ", invoiceNumber=" + invoiceNumber
185
				+ customerAddressId + ", totalAmount=" + totalAmount + ", invoiceNumber=" + invoiceNumber
175
				+ ", createTimestamp=" + createTimestamp + ", fofoLineItem=" + fofoLineItem + ", paymentOption="
186
				+ ", cashback=" + cashback + ", createTimestamp=" + createTimestamp + ", fofoLineItem=" + fofoLineItem
176
				+ paymentOption + ", customer=" + customer + "]";
187
				+ ", paymentOption=" + paymentOption + ", customer=" + customer + ", customerAddress=" + customerAddress
-
 
188
				+ "]";
177
	}
189
	}
178
	
190
	
179
	
-
 
180
}
191
}