Subversion Repositories SmartDukaan

Rev

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

Rev 29624 Rev 30121
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
3
import java.io.Serializable;
-
 
4
import java.time.LocalDateTime;
-
 
5
 
-
 
6
import javax.persistence.Column;
3
import javax.persistence.Column;
7
import javax.persistence.Entity;
4
import javax.persistence.Entity;
8
import javax.persistence.Id;
5
import javax.persistence.Id;
9
import javax.persistence.Table;
6
import javax.persistence.Table;
-
 
7
import java.io.Serializable;
-
 
8
import java.time.LocalDateTime;
-
 
9
import java.util.Objects;
10
 
10
 
11
@Entity
11
@Entity
12
@Table(name="fofo.scheme_item", schema = "fofo")
12
@Table(name = "fofo.scheme_item", schema = "fofo")
13
public class SchemeItem implements Serializable{
13
public class SchemeItem implements Serializable {
14
 
14
 
15
	private static final long serialVersionUID = 1L;
15
	private static final long serialVersionUID = 1L;
16
 
16
 
17
	@Id
17
	@Id
18
	@Column(name = "scheme_id")
18
	@Column(name = "scheme_id")
19
	private int schemeId;
19
	private int schemeId;
20
	
20
 
21
	@Id
21
	@Id
22
	@Column(name = "item_id")
22
	@Column(name = "catalog_id")
23
	private int itemId;
23
	private int catalogId;
24
	
24
 
25
	@Column(name = "create_timestamp")
25
	@Column(name = "create_timestamp")
26
	private LocalDateTime createTimestamp = LocalDateTime.now();
26
	private LocalDateTime createTimestamp = LocalDateTime.now();
27
	
27
 
28
	public int getSchemeId() {
28
	public int getSchemeId() {
29
		return schemeId;
29
		return schemeId;
30
	}
30
	}
31
	
31
 
32
	public void setSchemeId(int schemeId) {
32
	public void setSchemeId(int schemeId) {
33
		this.schemeId = schemeId;
33
		this.schemeId = schemeId;
34
	}
34
	}
-
 
35
 
-
 
36
	@Override
-
 
37
	public boolean equals(Object o) {
-
 
38
		if (this == o) return true;
-
 
39
		if (o == null || getClass() != o.getClass()) return false;
-
 
40
		SchemeItem that = (SchemeItem) o;
-
 
41
		return schemeId == that.schemeId && catalogId == that.catalogId && Objects.equals(createTimestamp, that.createTimestamp);
35
	
42
	}
-
 
43
 
-
 
44
	@Override
36
	public int getItemId() {
45
	public String toString() {
37
		return itemId;
46
		return "SchemeItem{" +
-
 
47
				"schemeId=" + schemeId +
-
 
48
				", catalogId=" + catalogId +
-
 
49
				", createTimestamp=" + createTimestamp +
-
 
50
				'}';
38
	}
51
	}
39
	
52
 
-
 
53
	@Override
40
	public void setItemId(int itemId) {
54
	public int hashCode() {
41
		this.itemId = itemId;
55
		return Objects.hash(schemeId, catalogId, createTimestamp);
42
	}
56
	}
43
	
-
 
44
	
-
 
45
 
57
 
46
	public LocalDateTime getCreateTimestamp() {
58
	public LocalDateTime getCreateTimestamp() {
47
		return createTimestamp;
59
		return createTimestamp;
48
	}
60
	}
49
 
61
 
50
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
62
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
51
		this.createTimestamp = createTimestamp;
63
		this.createTimestamp = createTimestamp;
52
	}
64
	}
53
 
65
 
54
	@Override
-
 
55
	public int hashCode() {
66
	public int getCatalogId() {
56
		final int prime = 31;
-
 
57
		int result = 1;
-
 
58
		result = prime * result + itemId;
-
 
59
		result = prime * result + schemeId;
-
 
60
		return result;
-
 
61
	}
-
 
62
	
-
 
63
	
-
 
64
	
-
 
65
	
-
 
66
 
-
 
67
	@Override
-
 
68
	public boolean equals(Object obj) {
-
 
69
		if (this == obj)
-
 
70
			return true;
-
 
71
		if (obj == null)
-
 
72
			return false;
-
 
73
		if (getClass() != obj.getClass())
-
 
74
			return false;
-
 
75
		SchemeItem other = (SchemeItem) obj;
-
 
76
		if (itemId != other.itemId)
-
 
77
			return false;
-
 
78
		if (schemeId != other.schemeId)
-
 
79
			return false;
67
		return catalogId;
80
		return true;
-
 
81
	}
68
	}
82
 
69
 
83
	@Override
-
 
84
	public String toString() {
70
	public void setCatalogId(int catalogId) {
85
		return "SchemeItem [schemeId=" + schemeId + ", itemId=" + itemId + ", createTimestamp=" + createTimestamp + "]";
71
		this.catalogId = catalogId;
86
	}
72
	}
87
	
73
 
88
	
74
 
89
}
75
}