Subversion Repositories SmartDukaan

Rev

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

Rev 29831 Rev 31376
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;
3
import java.io.Serializable;
-
 
4
import java.util.Objects;
4
 
5
 
5
import javax.persistence.Column;
6
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
9
import javax.persistence.GenerationType;
Line 14... Line 15...
14
 * 
15
 * 
15
 * @author ashikali
16
 * @author ashikali
16
 *
17
 *
17
 */
18
 */
18
@Entity
19
@Entity
19
@Table(name="fofo.payment_option", schema = "fofo")
20
@Table(name = "fofo.payment_option", schema = "fofo")
20
public class PaymentOption implements Serializable{
21
public class PaymentOption implements Serializable {
21
	
22
 
22
	private static final long serialVersionUID = 1L;
23
	private static final long serialVersionUID = 1L;
23
	
24
 
24
	public PaymentOption() {
25
	public PaymentOption() {
25
	}
26
	}
26
	
27
 
27
	@Id
28
	@Id
28
	@Column(name="id")
29
	@Column(name = "id")
29
	@GeneratedValue(strategy = GenerationType.IDENTITY)
30
	@GeneratedValue(strategy = GenerationType.IDENTITY)
30
	private int id;
31
	private int id;
31
	
32
 
32
	@Column(name = "name", unique = true)
33
	@Column(name = "name", unique = true)
33
	private String name;
34
	private String name;
34
	
35
 
35
	@Column(name = "sort_by", unique = true)
36
	@Column(name = "sort_by", unique = true)
36
	private String sortBy;
37
	private String sortBy;
-
 
38
 
-
 
39
	@Column(name = "active", unique = true)
-
 
40
	private boolean active;
-
 
41
 
-
 
42
	public boolean isActive() {
-
 
43
		return active;
37
	
44
	}
-
 
45
 
-
 
46
	public void setActive(boolean active) {
-
 
47
		this.active = active;
-
 
48
	}
-
 
49
 
38
	public int getId() {
50
	public int getId() {
39
		return id;
51
		return id;
40
	}
52
	}
-
 
53
 
41
	public void setId(int id) {
54
	public void setId(int id) {
42
		this.id = id;
55
		this.id = id;
43
	}
56
	}
44
	
57
 
45
	public String getName() {
58
	public String getName() {
46
		return name;
59
		return name;
47
	}
60
	}
48
	
61
 
49
	public void setName(String name) {
62
	public void setName(String name) {
50
		this.name = name;
63
		this.name = name;
51
	}
64
	}
52
	
-
 
53
	
-
 
54
	
-
 
55
	
65
 
56
	public String getSortBy() {
66
	public String getSortBy() {
57
		return sortBy;
67
		return sortBy;
58
	}
68
	}
-
 
69
 
59
	public void setSortBy(String sortBy) {
70
	public void setSortBy(String sortBy) {
60
		this.sortBy = sortBy;
71
		this.sortBy = sortBy;
61
	}
72
	}
-
 
73
 
62
	@Override
74
	@Override
63
	public int hashCode() {
75
	public int hashCode() {
64
		final int prime = 31;
-
 
65
		int result = 1;
-
 
66
		result = prime * result + id;
76
		return Objects.hash(active, id, name, sortBy);
67
		return result;
-
 
68
	}
77
	}
-
 
78
 
69
	@Override
79
	@Override
70
	public boolean equals(Object obj) {
80
	public boolean equals(Object obj) {
71
		if (this == obj)
81
		if (this == obj)
72
			return true;
82
			return true;
73
		if (obj == null)
83
		if (obj == null)
74
			return false;
84
			return false;
75
		if (getClass() != obj.getClass())
85
		if (getClass() != obj.getClass())
76
			return false;
86
			return false;
77
		PaymentOption other = (PaymentOption) obj;
87
		PaymentOption other = (PaymentOption) obj;
78
		if (id != other.id)
88
		return active == other.active && id == other.id && Objects.equals(name, other.name)
79
			return false;
89
				&& Objects.equals(sortBy, other.sortBy);
80
		return true;
-
 
81
	}
90
	}
82
	
91
 
83
	@Override
92
	@Override
84
	public String toString() {
93
	public String toString() {
85
		return "PaymentOption [id=" + id + ", name=" + name + "]";
94
		return "PaymentOption [id=" + id + ", name=" + name + ", sortBy=" + sortBy + ", active=" + active + "]";
86
	}
95
	}
87
	
-
 
88
	
96
 
89
}
97
}
90
98