Subversion Repositories SmartDukaan

Rev

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

Rev 30823 Rev 30896
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
3
import javax.persistence.*;
3
import javax.persistence.*;
4
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
-
 
5
import java.util.Objects;
5
 
6
 
6
@Entity
7
@Entity
7
@Table(name = "fofo.activated_imei", schema = "fofo")
8
@Table(name = "fofo.activated_imei", schema = "fofo")
8
 
9
 
9
@NamedQueries({
10
@NamedQueries({
Line 68... Line 69...
68
	private LocalDateTime activationTimestamp;
69
	private LocalDateTime activationTimestamp;
69
 
70
 
70
	@Column(name = "create_timestamp")
71
	@Column(name = "create_timestamp")
71
	private LocalDateTime createTimestamp;
72
	private LocalDateTime createTimestamp;
72
 
73
 
-
 
74
	@Column
-
 
75
	private boolean checked;
-
 
76
 
73
	public ActivatedImei() {
77
	public ActivatedImei() {
74
		super();
78
		super();
75
	}
79
	}
76
 
80
 
77
	public ActivatedImei(String serialNumber, LocalDateTime activationTimestamp) {
81
	public ActivatedImei(String serialNumber, LocalDateTime activationTimestamp) {
78
		this.activationTimestamp = activationTimestamp;
82
		this.activationTimestamp = activationTimestamp;
79
		this.serialNumber = serialNumber;
83
		this.serialNumber = serialNumber;
80
	}
84
	}
81
 
85
 
82
	@Override
-
 
83
	public String toString() {
-
 
84
		return "ActivatedImei [serialNumber=" + serialNumber + ", activationTimestamp=" + activationTimestamp
-
 
85
				+ ", createTimestamp=" + createTimestamp + "]";
-
 
86
	}
-
 
87
 
-
 
88
	public String getSerialNumber() {
86
	public String getSerialNumber() {
89
		return serialNumber;
87
		return serialNumber;
90
	}
88
	}
91
 
89
 
92
	public void setSerialNumber(String serialNumber) {
90
	public void setSerialNumber(String serialNumber) {
Line 108... Line 106...
108
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
106
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
109
		this.createTimestamp = createTimestamp;
107
		this.createTimestamp = createTimestamp;
110
	}
108
	}
111
 
109
 
112
	@Override
110
	@Override
113
	public int hashCode() {
111
	public String toString() {
114
		final int prime = 31;
112
		return "ActivatedImei{" +
115
		int result = 1;
113
				"serialNumber='" + serialNumber + '\'' +
116
		result = prime * result + ((activationTimestamp == null) ? 0 : activationTimestamp.hashCode());
114
				", activationTimestamp=" + activationTimestamp +
117
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
115
				", createTimestamp=" + createTimestamp +
118
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
116
				", checked=" + checked +
119
		return result;
117
				'}';
120
	}
118
	}
121
 
119
 
122
	@Override
120
	@Override
123
	public boolean equals(Object obj) {
121
	public boolean equals(Object o) {
124
		if (this == obj)
122
		if (this == o) return true;
125
			return true;
-
 
126
		if (obj == null)
-
 
127
			return false;
-
 
128
		if (getClass() != obj.getClass())
123
		if (o == null || getClass() != o.getClass()) return false;
129
			return false;
-
 
130
		ActivatedImei other = (ActivatedImei) obj;
124
		ActivatedImei that = (ActivatedImei) o;
131
		if (activationTimestamp == null) {
-
 
132
			if (other.activationTimestamp != null)
-
 
133
				return false;
-
 
134
		} else if (!activationTimestamp.equals(other.activationTimestamp))
125
		return checked == that.checked && Objects.equals(serialNumber, that.serialNumber) && Objects.equals(activationTimestamp, that.activationTimestamp) && Objects.equals(createTimestamp, that.createTimestamp);
-
 
126
	}
-
 
127
 
135
			return false;
128
	@Override
136
		if (createTimestamp == null) {
129
	public int hashCode() {
137
			if (other.createTimestamp != null)
-
 
138
				return false;
-
 
139
		} else if (!createTimestamp.equals(other.createTimestamp))
130
		return Objects.hash(serialNumber, activationTimestamp, createTimestamp, checked);
140
			return false;
131
	}
-
 
132
 
141
		if (serialNumber == null) {
133
	public boolean isChecked() {
142
			if (other.serialNumber != null)
-
 
143
				return false;
134
		return checked;
-
 
135
	}
-
 
136
 
144
		} else if (!serialNumber.equals(other.serialNumber))
137
	public void setChecked(boolean checked) {
145
			return false;
138
		this.checked = checked;
146
		return true;
-
 
147
	}
139
	}
148
 
140
 
149
}
141
}