Subversion Repositories SmartDukaan

Rev

Rev 23504 | Go to most recent revision | Details | Compare with Previous | 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
 
23974 amit.gupta 55
	@Column(name = "operator_code")
56
	private String operatorCode;
57
 
58
	public String getOperatorCode() {
59
		return operatorCode;
60
	}
61
 
62
	public void setOperatorCode(String operatorCode) {
63
		this.operatorCode = operatorCode;
64
	}
65
 
23504 ashik.ali 66
	@Convert(converter = LocalDateTimeAttributeConverter.class)
67
	@Column(name="create_timestamp", updatable = false)
68
	private LocalDateTime createTimestamp = LocalDateTime.now();
69
 
70
	public int getId() {
71
		return id;
72
	}
73
 
74
	public void setId(int id) {
75
		this.id = id;
76
	}
77
 
78
	public String getName() {
79
		return name;
80
	}
81
 
82
	public void setName(String name) {
83
		this.name = name;
84
	}
85
 
86
	public String getKeyword() {
87
		return keyword;
88
	}
89
 
90
	public void setKeyword(String keyword) {
91
		this.keyword = keyword;
92
	}
93
 
94
	public RechargeType getRechargeType() {
95
		return rechargeType;
96
	}
97
 
98
	public void setRechargeType(RechargeType rechargeType) {
99
		this.rechargeType = rechargeType;
100
	}
101
 
102
	public OperatorType getOperatorType() {
103
		return operatorType;
104
	}
105
 
106
	public void setOperatorType(OperatorType operatorType) {
107
		this.operatorType = operatorType;
108
	}
109
 
110
	public LocalDateTime getCreateTimestamp() {
111
		return createTimestamp;
112
	}
113
 
114
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
115
		this.createTimestamp = createTimestamp;
116
	}
117
 
118
	@Override
119
	public int hashCode() {
120
		final int prime = 31;
121
		int result = 1;
122
		result = prime * result + id;
123
		return result;
124
	}
125
 
126
	@Override
127
	public boolean equals(Object obj) {
128
		if (this == obj)
129
			return true;
130
		if (obj == null)
131
			return false;
132
		if (getClass() != obj.getClass())
133
			return false;
134
		RechargeOperator other = (RechargeOperator) obj;
135
		if (id != other.id)
136
			return false;
137
		return true;
138
	}
139
 
140
	@Override
141
	public String toString() {
142
		return "RechargeOperator [id=" + id + ", name=" + name + ", keyword=" + keyword + ", rechargeType="
23974 amit.gupta 143
				+ rechargeType + ", operatorType=" + operatorType + ", operatorCode=" + operatorCode
144
				+ ", createTimestamp=" + createTimestamp + "]";
23504 ashik.ali 145
	}
146
 
147
}