Subversion Repositories SmartDukaan

Rev

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

Rev 22600 Rev 22653
Line 15... Line 15...
15
 * 
15
 * 
16
 * @author ashikali
16
 * @author ashikali
17
 *
17
 *
18
 */
18
 */
19
@Entity
19
@Entity
20
@Table(name="catalog.retailer_tag", schema = "catalog", uniqueConstraints = {@UniqueConstraint(columnNames = {"retailer_id","scheme_tag_id"})})
20
@Table(name="catalog.retailer_scheme", schema = "catalog", uniqueConstraints = {@UniqueConstraint(columnNames = {"retailer_id","scheme_id"})})
21
 
21
 
22
public class RetailerSchemeTag implements Serializable{
22
public class RetailerScheme implements Serializable{
23
	
23
	
24
	private static final long serialVersionUID = 1L;
24
	private static final long serialVersionUID = 1L;
25
	
25
	
26
	public RetailerSchemeTag() {
26
	public RetailerScheme() {
27
	}
27
	}
28
	
28
	
29
	@Id
29
	@Id
30
	@Column(name="id", columnDefinition = "int(10) unsigned")
30
	@Column(name="id")
31
	@GeneratedValue(strategy = GenerationType.IDENTITY)
31
	@GeneratedValue(strategy = GenerationType.IDENTITY)
32
	private int id;
32
	private int id;
33
	
33
	
34
	@Column(name="retailer_id")
34
	@Column(name="retailer_id")
35
	private int retailerId;
35
	private int retailerId;
36
	
36
	
37
	@Column(name = "scheme_tag_id")
37
	@Column(name = "scheme_id")
38
	private int schemeTagId;
38
	private int schemeId;
39
	
-
 
40
	@Column(name = "active", columnDefinition="tinyint(1) default 0")
-
 
41
	private boolean active;
-
 
42
	
39
	
43
	public int getId() {
40
	public int getId() {
44
		return id;
41
		return id;
45
	}
42
	}
46
	public void setId(int id) {
43
	public void setId(int id) {
Line 51... Line 48...
51
		return retailerId;
48
		return retailerId;
52
	}
49
	}
53
	public void setRetailerId(int retailerId) {
50
	public void setRetailerId(int retailerId) {
54
		this.retailerId = retailerId;
51
		this.retailerId = retailerId;
55
	}
52
	}
56
	public int getSchemeTagId() {
53
	public int getSchemeId() {
57
		return schemeTagId;
54
		return schemeId;
58
	}
-
 
59
	public void setSchemeTagId(int schemeTagId) {
-
 
60
		this.schemeTagId = schemeTagId;
-
 
61
	}
55
	}
62
    public boolean isActive() {
-
 
63
		return active;
-
 
64
	}
-
 
65
    public void setActive(boolean active) {
56
	public void setSchemeId(int schemeId) {
66
		this.active = active;
57
		this.schemeId = schemeId;
67
	}
58
	}
68
    
59
    
69
	@Override
60
	@Override
70
	public int hashCode() {
61
	public int hashCode() {
71
		final int prime = 31;
62
		final int prime = 31;
72
		int result = 1;
63
		int result = 1;
73
		result = prime * result + retailerId;
64
		result = prime * result + retailerId;
74
		result = prime * result + schemeTagId;
65
		result = prime * result + schemeId;
75
		return result;
66
		return result;
76
	}
67
	}
77
	@Override
68
	@Override
78
	public boolean equals(Object obj) {
69
	public boolean equals(Object obj) {
79
		if (this == obj)
70
		if (this == obj)
80
			return true;
71
			return true;
81
		if (obj == null)
72
		if (obj == null)
82
			return false;
73
			return false;
83
		if (getClass() != obj.getClass())
74
		if (getClass() != obj.getClass())
84
			return false;
75
			return false;
85
		RetailerSchemeTag other = (RetailerSchemeTag) obj;
76
		RetailerScheme other = (RetailerScheme) obj;
86
		if (retailerId != other.retailerId)
77
		if (retailerId != other.retailerId)
87
			return false;
78
			return false;
88
		if (schemeTagId != other.schemeTagId)
79
		if (schemeId != other.schemeId)
89
			return false;
80
			return false;
90
		return true;
81
		return true;
91
	}
82
	}
92
	@Override
83
	@Override
93
	public String toString() {
84
	public String toString() {
94
		return "FofoTag [id=" + id + ", retailerId=" + retailerId + ", schemeTagId=" + schemeTagId + ", active=" + active + "]";
85
		return "RetailerSchemeTag [id=" + id + ", retailerId=" + retailerId + ", schemeId=" + schemeId + "]";
95
	}
86
	}
-
 
87
	
96
 
88
 
97
}
89
}
98
90