Subversion Repositories SmartDukaan

Rev

Rev 23974 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23504 ashik.ali 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Convert;
8
import javax.persistence.Entity;
9
import javax.persistence.EnumType;
10
import javax.persistence.Enumerated;
11
import javax.persistence.GeneratedValue;
12
import javax.persistence.GenerationType;
13
import javax.persistence.Id;
14
import javax.persistence.Table;
15
 
16
import com.spice.profitmandi.common.model.OperatorType;
17
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
18
import com.spice.profitmandi.dao.enumuration.dtr.RechargeType;
19
 
20
/**
21
 * This class basically contains recharge operator details
22
 * 
23
 * @author ashikali
24
 *
25
 */
26
 
27
@Entity
28
@Table(name="dtr.recharge_operator", schema = "dtr")
29
public class RechargeOperator implements Serializable{
30
 
31
	private static final long serialVersionUID = 1L;
32
 
33
	public RechargeOperator() {
34
	}
35
 
36
	@Id
37
	@Column(name="id", unique=true, updatable=false)
38
	@GeneratedValue(strategy = GenerationType.IDENTITY)
39
	private int id;
40
 
41
	@Column(name="name")
42
	private String name;
43
 
44
	@Column(name="keyword")
45
	private String keyword;
46
 
47
	@Column(name = "recharge_type")
48
	@Enumerated(EnumType.STRING)
49
	private RechargeType rechargeType;
50
 
51
	@Column(name = "operator_type")
52
	@Enumerated(EnumType.STRING)
53
	private OperatorType operatorType;
54
 
55
	@Convert(converter = LocalDateTimeAttributeConverter.class)
56
	@Column(name="create_timestamp", updatable = false)
57
	private LocalDateTime createTimestamp = LocalDateTime.now();
58
 
59
	public int getId() {
60
		return id;
61
	}
62
 
63
	public void setId(int id) {
64
		this.id = id;
65
	}
66
 
67
	public String getName() {
68
		return name;
69
	}
70
 
71
	public void setName(String name) {
72
		this.name = name;
73
	}
74
 
75
	public String getKeyword() {
76
		return keyword;
77
	}
78
 
79
	public void setKeyword(String keyword) {
80
		this.keyword = keyword;
81
	}
82
 
83
	public RechargeType getRechargeType() {
84
		return rechargeType;
85
	}
86
 
87
	public void setRechargeType(RechargeType rechargeType) {
88
		this.rechargeType = rechargeType;
89
	}
90
 
91
	public OperatorType getOperatorType() {
92
		return operatorType;
93
	}
94
 
95
	public void setOperatorType(OperatorType operatorType) {
96
		this.operatorType = operatorType;
97
	}
98
 
99
	public LocalDateTime getCreateTimestamp() {
100
		return createTimestamp;
101
	}
102
 
103
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
104
		this.createTimestamp = createTimestamp;
105
	}
106
 
107
	@Override
108
	public int hashCode() {
109
		final int prime = 31;
110
		int result = 1;
111
		result = prime * result + id;
112
		return result;
113
	}
114
 
115
	@Override
116
	public boolean equals(Object obj) {
117
		if (this == obj)
118
			return true;
119
		if (obj == null)
120
			return false;
121
		if (getClass() != obj.getClass())
122
			return false;
123
		RechargeOperator other = (RechargeOperator) obj;
124
		if (id != other.id)
125
			return false;
126
		return true;
127
	}
128
 
129
	@Override
130
	public String toString() {
131
		return "RechargeOperator [id=" + id + ", name=" + name + ", keyword=" + keyword + ", rechargeType="
132
				+ rechargeType + ", operatorType=" + operatorType + ", createTimestamp=" + createTimestamp + "]";
133
	}
134
 
135
}