Subversion Repositories SmartDukaan

Rev

Rev 26299 | Rev 28825 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
26299 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import java.time.LocalDateTime;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
 
10
@Entity
11
@Table(name = "fofo.activated_imei", schema = "fofo")
12
public class ActivatedImei {
26309 amit.gupta 13
	@Id
14
	@Column(name = "serial_number", unique = true)
15
	private String serialNumber;
16
 
17
	@Column(name = "activation_timestamp")
18
	private LocalDateTime activationTimestamp;
26299 amit.gupta 19
 
26309 amit.gupta 20
	@Column(name = "create_timestamp")
21
	private LocalDateTime createTimestamp;
22
 
26299 amit.gupta 23
	public ActivatedImei() {
24
		super();
25
	}
26
 
27
	public ActivatedImei(String serialNumber, LocalDateTime activationTimestamp) {
28
		this.activationTimestamp = activationTimestamp;
29
		this.serialNumber = serialNumber;
30
	}
31
 
32
	@Override
33
	public String toString() {
26309 amit.gupta 34
		return "ActivatedImei [serialNumber=" + serialNumber + ", activationTimestamp=" + activationTimestamp
35
				+ ", createTimestamp=" + createTimestamp + "]";
26299 amit.gupta 36
	}
37
 
38
	public String getSerialNumber() {
39
		return serialNumber;
40
	}
41
 
42
	public void setSerialNumber(String serialNumber) {
43
		this.serialNumber = serialNumber;
44
	}
45
 
46
	public LocalDateTime getActivationTimestamp() {
47
		return activationTimestamp;
48
	}
49
 
50
	public void setActivationTimestamp(LocalDateTime activationTimestamp) {
51
		this.activationTimestamp = activationTimestamp;
52
	}
26309 amit.gupta 53
 
54
 
26299 amit.gupta 55
 
26309 amit.gupta 56
	public LocalDateTime getCreateTimestamp() {
57
		return createTimestamp;
58
	}
59
 
60
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
61
		this.createTimestamp = createTimestamp;
62
	}
63
 
26299 amit.gupta 64
	@Override
65
	public int hashCode() {
66
		final int prime = 31;
67
		int result = 1;
26309 amit.gupta 68
		result = prime * result + ((activationTimestamp == null) ? 0 : activationTimestamp.hashCode());
69
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
26299 amit.gupta 70
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
71
		return result;
72
	}
73
 
74
	@Override
75
	public boolean equals(Object obj) {
76
		if (this == obj)
77
			return true;
78
		if (obj == null)
79
			return false;
80
		if (getClass() != obj.getClass())
81
			return false;
82
		ActivatedImei other = (ActivatedImei) obj;
26309 amit.gupta 83
		if (activationTimestamp == null) {
84
			if (other.activationTimestamp != null)
85
				return false;
86
		} else if (!activationTimestamp.equals(other.activationTimestamp))
87
			return false;
88
		if (createTimestamp == null) {
89
			if (other.createTimestamp != null)
90
				return false;
91
		} else if (!createTimestamp.equals(other.createTimestamp))
92
			return false;
26299 amit.gupta 93
		if (serialNumber == null) {
94
			if (other.serialNumber != null)
95
				return false;
96
		} else if (!serialNumber.equals(other.serialNumber))
97
			return false;
98
		return true;
99
	}
100
 
101
 
102
 
103
}