Subversion Repositories SmartDukaan

Rev

Rev 34317 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34317 Rev 36397
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
3
import javax.persistence.Column;
-
 
4
import javax.persistence.Entity;
-
 
5
import javax.persistence.Id;
3
import javax.persistence.*;
6
import javax.persistence.Table;
-
 
7
import java.io.Serializable;
4
import java.io.Serializable;
8
import java.time.LocalDateTime;
5
import java.time.LocalDateTime;
9
import java.util.Objects;
6
import java.util.Objects;
10
 
7
 
11
@Entity
8
@Entity
12
@Table(name = "fofo.scheme_item")
9
@Table(name = "fofo.scheme_item",
-
 
10
		uniqueConstraints = @UniqueConstraint(columnNames = {"catalog_id", "scheme_id", "start_date", "end_date"}))
13
public class SchemeItem implements Serializable {
11
public class SchemeItem implements Serializable {
14
 
12
 
15
	private static final long serialVersionUID = 1L;
13
	private static final long serialVersionUID = 1L;
16
 
14
 
17
	@Id
15
	@Id
-
 
16
	@Column(name = "id")
-
 
17
	@GeneratedValue(strategy = GenerationType.IDENTITY)
-
 
18
	private long id;
-
 
19
 
18
	@Column(name = "scheme_id")
20
	@Column(name = "scheme_id")
19
	private int schemeId;
21
	private int schemeId;
20
 
22
 
21
	@Id
-
 
22
	@Column(name = "catalog_id")
23
	@Column(name = "catalog_id")
23
	private int catalogId;
24
	private int catalogId;
24
 
25
 
25
	@Column(name = "start_date")
26
	@Column(name = "start_date")
26
	private LocalDateTime startDate;
27
	private LocalDateTime startDate;
Line 29... Line 30...
29
	private LocalDateTime endDate;
30
	private LocalDateTime endDate;
30
 
31
 
31
	@Column(name = "create_timestamp")
32
	@Column(name = "create_timestamp")
32
	private LocalDateTime createTimestamp = LocalDateTime.now();
33
	private LocalDateTime createTimestamp = LocalDateTime.now();
33
 
34
 
-
 
35
	@Column(name = "updated_by")
-
 
36
	private Integer updatedBy;
-
 
37
 
-
 
38
	@Column(name = "updated_on")
-
 
39
	private LocalDateTime updatedOn;
-
 
40
 
-
 
41
	public long getId() {
-
 
42
		return id;
-
 
43
	}
-
 
44
 
-
 
45
	public void setId(long id) {
-
 
46
		this.id = id;
-
 
47
	}
-
 
48
 
34
	public int getSchemeId() {
49
	public int getSchemeId() {
35
		return schemeId;
50
		return schemeId;
36
	}
51
	}
37
 
52
 
38
	public void setSchemeId(int schemeId) {
53
	public void setSchemeId(int schemeId) {
Line 53... Line 68...
53
 
68
 
54
	public void setCatalogId(int catalogId) {
69
	public void setCatalogId(int catalogId) {
55
		this.catalogId = catalogId;
70
		this.catalogId = catalogId;
56
	}
71
	}
57
 
72
 
-
 
73
	public Integer getUpdatedBy() {
-
 
74
		return updatedBy;
-
 
75
	}
-
 
76
 
-
 
77
	public void setUpdatedBy(Integer updatedBy) {
-
 
78
		this.updatedBy = updatedBy;
-
 
79
	}
-
 
80
 
-
 
81
	public LocalDateTime getUpdatedOn() {
-
 
82
		return updatedOn;
-
 
83
	}
-
 
84
 
-
 
85
	public void setUpdatedOn(LocalDateTime updatedOn) {
-
 
86
		this.updatedOn = updatedOn;
-
 
87
	}
-
 
88
 
58
	@Override
89
	@Override
59
	public String toString() {
90
	public String toString() {
60
		return "SchemeItem{" +
91
		return "SchemeItem{" +
-
 
92
				"id=" + id +
61
				"schemeId=" + schemeId +
93
				", schemeId=" + schemeId +
62
				", catalogId=" + catalogId +
94
				", catalogId=" + catalogId +
63
				", startDate=" + startDate +
95
				", startDate=" + startDate +
64
				", endDate=" + endDate +
96
				", endDate=" + endDate +
65
				", createTimestamp=" + createTimestamp +
97
				", createTimestamp=" + createTimestamp +
-
 
98
				", updatedBy=" + updatedBy +
-
 
99
				", updatedOn=" + updatedOn +
66
				'}';
100
				'}';
67
	}
101
	}
68
 
102
 
69
	@Override
103
	@Override
70
	public boolean equals(Object o) {
104
	public boolean equals(Object o) {
71
		if (this == o) return true;
105
		if (this == o) return true;
72
		if (o == null || getClass() != o.getClass()) return false;
106
		if (o == null || getClass() != o.getClass()) return false;
73
		SchemeItem that = (SchemeItem) o;
107
		SchemeItem that = (SchemeItem) o;
74
		return schemeId == that.schemeId && catalogId == that.catalogId && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate) && Objects.equals(createTimestamp, that.createTimestamp);
108
		return schemeId == that.schemeId && catalogId == that.catalogId && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate);
75
	}
109
	}
76
 
110
 
77
	@Override
111
	@Override
78
	public int hashCode() {
112
	public int hashCode() {
79
		return Objects.hash(schemeId, catalogId, startDate, endDate, createTimestamp);
113
		return Objects.hash(schemeId, catalogId, startDate, endDate);
80
	}
114
	}
81
 
115
 
82
	public LocalDateTime getStartDate() {
116
	public LocalDateTime getStartDate() {
83
		return startDate;
117
		return startDate;
84
	}
118
	}