Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
27348 amit.gupta 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import java.time.LocalDateTime;
4
 
5
public class GpsLocationModel {
6
	private int userId;
7
	private int locationId;
8
	private LocalDateTime createTime;
9
	private boolean gps;
10
	private double lat;
11
	private double lng;
12
 
13
	public int getUserId() {
14
		return userId;
15
	}
16
	public void setUserId(int userId) {
17
		this.userId = userId;
18
	}
19
	public int getLocationId() {
20
		return locationId;
21
	}
22
	public void setLocationId(int locationId) {
23
		this.locationId = locationId;
24
	}
25
	public LocalDateTime getCreateTime() {
26
		return createTime;
27
	}
28
	public void setCreateTime(LocalDateTime createTime) {
29
		this.createTime = createTime;
30
	}
31
	public double getLat() {
32
		return lat;
33
	}
34
	public void setLat(double lat) {
35
		this.lat = lat;
36
	}
37
	public double getLng() {
38
		return lng;
39
	}
40
	public void setLng(double lng) {
41
		this.lng = lng;
42
	}
43
	@Override
44
	public String toString() {
45
		return "LocationModel [userId=" + userId + ", locationId=" + locationId + ", createTime=" + createTime
46
				+ ", gps=" + gps + ", lat=" + lat + ", lng=" + lng + "]";
47
	}
48
	public boolean isGps() {
49
		return gps;
50
	}
51
	public void setGps(boolean gps) {
52
		this.gps = gps;
53
	}
54
	@Override
55
	public int hashCode() {
56
		final int prime = 31;
57
		int result = 1;
58
		result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
59
		result = prime * result + (gps ? 1231 : 1237);
60
		long temp;
61
		temp = Double.doubleToLongBits(lat);
62
		result = prime * result + (int) (temp ^ (temp >>> 32));
63
		temp = Double.doubleToLongBits(lng);
64
		result = prime * result + (int) (temp ^ (temp >>> 32));
65
		result = prime * result + locationId;
66
		result = prime * result + userId;
67
		return result;
68
	}
69
	@Override
70
	public boolean equals(Object obj) {
71
		if (this == obj)
72
			return true;
73
		if (obj == null)
74
			return false;
75
		if (getClass() != obj.getClass())
76
			return false;
77
		GpsLocationModel other = (GpsLocationModel) obj;
78
		if (createTime == null) {
79
			if (other.createTime != null)
80
				return false;
81
		} else if (!createTime.equals(other.createTime))
82
			return false;
83
		if (gps != other.gps)
84
			return false;
85
		if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat))
86
			return false;
87
		if (Double.doubleToLongBits(lng) != Double.doubleToLongBits(other.lng))
88
			return false;
89
		if (locationId != other.locationId)
90
			return false;
91
		if (userId != other.userId)
92
			return false;
93
		return true;
94
	}
95
 
96
}