Subversion Repositories SmartDukaan

Rev

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

Rev 22859 Rev 23019
Line 53... Line 53...
53
	
53
	
54
	@Column(name = "amount")
54
	@Column(name = "amount")
55
	private float amount;
55
	private float amount;
56
	
56
	
57
	@Convert(converter = LocalDateTimeAttributeConverter.class)
57
	@Convert(converter = LocalDateTimeAttributeConverter.class)
58
	@Column(name = "start_date")
58
	@Column(name = "start_date_time")
59
	private LocalDateTime startDate = LocalDateTime.now();
59
	private LocalDateTime startDateTime = LocalDateTime.now();
60
	
60
	
61
	@Convert(converter = LocalDateTimeAttributeConverter.class)
61
	@Convert(converter = LocalDateTimeAttributeConverter.class)
62
	@Column(name = "end_date")
62
	@Column(name = "end_date_time")
63
	private LocalDateTime endDate = LocalDateTime.now();
63
	private LocalDateTime endDateTime = LocalDateTime.now();
64
	
64
	
65
	@Convert(converter = LocalDateTimeAttributeConverter.class)
65
	@Convert(converter = LocalDateTimeAttributeConverter.class)
66
	@Column(name = "create_timestamp")
66
	@Column(name = "create_timestamp")
67
	private LocalDateTime createTimestamp = LocalDateTime.now();
67
	private LocalDateTime createTimestamp = LocalDateTime.now();
68
	
68
	
Line 130... Line 130...
130
	}
130
	}
131
	public void setAmount(float amount) {
131
	public void setAmount(float amount) {
132
		this.amount = amount;
132
		this.amount = amount;
133
	}
133
	}
134
	
134
	
135
	public LocalDateTime getStartDate() {
135
	public LocalDateTime getStartDateTime() {
136
		return startDate;
136
		return startDateTime;
137
	}
137
	}
-
 
138
	
138
	public void setStartDate(LocalDateTime startDate) {
139
	public void setStartDateTime(LocalDateTime startDateTime) {
139
		this.startDate = startDate;
140
		this.startDateTime = startDateTime;
140
	}
141
	}
141
	
142
	
142
	public LocalDateTime getEndDate() {
143
	public LocalDateTime getEndDateTime() {
143
		return endDate;
144
		return endDateTime;
144
	}
145
	}
-
 
146
	
145
	public void setEndDate(LocalDateTime endDate) {
147
	public void setEndDateTime(LocalDateTime endDateTime) {
146
		this.endDate = endDate;
148
		this.endDateTime = endDateTime;
147
	}
149
	}
148
	
150
	
149
	public LocalDateTime getCreateTimestamp() {
151
	public LocalDateTime getCreateTimestamp() {
150
		return createTimestamp;
152
		return createTimestamp;
151
	}
153
	}
Line 181... Line 183...
181
	
183
	
182
	public void setRetailerAll(boolean retailerAll) {
184
	public void setRetailerAll(boolean retailerAll) {
183
		this.retailerAll = retailerAll;
185
		this.retailerAll = retailerAll;
184
	}
186
	}
185
	
187
	
186
	public String getFormattedStartDate(){
188
	public String getFormattedStartDateTime(){
187
		if(startDate == null){
189
		if(startDateTime == null){
188
			return null;
190
			return null;
189
		}
191
		}
190
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
192
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
191
		return startDate.format(formatter);
193
		return startDateTime.format(formatter);
192
    }
194
    }
193
	
195
	
194
	public String getFormattedEndDate(){
196
	public String getFormattedEndDateTime(){
195
		if(endDate == null){
197
		if(endDateTime == null){
196
			return null;
198
			return null;
197
		}
199
		}
198
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
200
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
199
		return endDate.format(formatter);
201
		return endDateTime.format(formatter);
200
    }
202
    }
201
	
203
	
202
	public String getFormattedCreateTimestamp(){
204
	public String getFormattedCreateTimestamp(){
203
		if(createTimestamp == null){
205
		if(createTimestamp == null){
204
			return null;
206
			return null;
Line 277... Line 279...
277
		Scheme other = (Scheme) obj;
279
		Scheme other = (Scheme) obj;
278
		if (id != other.id)
280
		if (id != other.id)
279
			return false;
281
			return false;
280
		return true;
282
		return true;
281
	}
283
	}
-
 
284
	
282
	@Override
285
	@Override
283
	public String toString() {
286
	public String toString() {
284
		return "Scheme [id=" + id + ", name=" + name + ", description=" + description + ", type=" + type
287
		return "Scheme [id=" + id + ", name=" + name + ", description=" + description + ", type=" + type
285
				+ ", amountType=" + amountType + ", amount=" + amount + ", startDate=" + startDate + ", endDate="
288
				+ ", amountType=" + amountType + ", amount=" + amount + ", startDateTime=" + startDateTime
286
				+ endDate + ", createTimestamp=" + createTimestamp + ", activeTimestamp=" + activeTimestamp
289
				+ ", endDateTime=" + endDateTime + ", createTimestamp=" + createTimestamp + ", activeTimestamp="
-
 
290
				+ activeTimestamp + ", expireTimestamp=" + expireTimestamp + ", createdBy=" + createdBy
287
				+ ", expireTimestamp=" + expireTimestamp + ", createdBy=" + createdBy + ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds + "]";
291
				+ ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds + ", itemIds=" + itemIds + "]";
288
	}
292
	}
289
	
293
	
-
 
294
	
290
}
295
}
291
296