Subversion Repositories SmartDukaan

Rev

Rev 27348 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27348 Rev 27349
Line 2... Line 2...
2
 
2
 
3
import java.time.LocalDateTime;
3
import java.time.LocalDateTime;
4
 
4
 
5
public class GpsLocationModel {
5
public class GpsLocationModel {
6
	private int userId;
6
	private int userId;
7
	private int locationId;
7
	private int deviceId;
8
	private LocalDateTime createTime;
-
 
9
	private boolean gps;
8
	private boolean gps;
10
	private double lat;
9
	private double lat;
11
	private double lng;
10
	private double lng;
-
 
11
	private LocalDateTime createTime;
-
 
12
	
-
 
13
	
-
 
14
	public int getDeviceId() {
-
 
15
		return deviceId;
-
 
16
	}
-
 
17
	public void setDeviceId(int deviceId) {
-
 
18
		this.deviceId = deviceId;
-
 
19
	}
-
 
20
	public boolean isGps() {
-
 
21
		return gps;
-
 
22
	}
-
 
23
	public void setGps(boolean gps) {
-
 
24
		this.gps = gps;
-
 
25
	}
-
 
26
	@Override
-
 
27
	public String toString() {
-
 
28
		return "GpsLocationModel [userId=" + userId + ", deviceId=" + deviceId + ", createTime=" + createTime + ", gps="
-
 
29
				+ gps + ", lat=" + lat + ", lng=" + lng + "]";
-
 
30
	}
12
 
31
 
13
	public int getUserId() {
32
	public int getUserId() {
14
		return userId;
33
		return userId;
15
	}
34
	}
16
	public void setUserId(int userId) {
35
	public void setUserId(int userId) {
17
		this.userId = userId;
36
		this.userId = userId;
18
	}
37
	}
19
	public int getLocationId() {
-
 
20
		return locationId;
-
 
21
	}
-
 
22
	public void setLocationId(int locationId) {
-
 
23
		this.locationId = locationId;
-
 
24
	}
-
 
25
	public LocalDateTime getCreateTime() {
38
	public LocalDateTime getCreateTime() {
26
		return createTime;
39
		return createTime;
27
	}
40
	}
28
	public void setCreateTime(LocalDateTime createTime) {
41
	public void setCreateTime(LocalDateTime createTime) {
29
		this.createTime = createTime;
42
		this.createTime = createTime;
Line 39... Line 52...
39
	}
52
	}
40
	public void setLng(double lng) {
53
	public void setLng(double lng) {
41
		this.lng = lng;
54
		this.lng = lng;
42
	}
55
	}
43
	@Override
56
	@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() {
57
	public int hashCode() {
56
		final int prime = 31;
58
		final int prime = 31;
57
		int result = 1;
59
		int result = 1;
58
		result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
60
		result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
-
 
61
		result = prime * result + deviceId;
59
		result = prime * result + (gps ? 1231 : 1237);
62
		result = prime * result + (gps ? 1231 : 1237);
60
		long temp;
63
		long temp;
61
		temp = Double.doubleToLongBits(lat);
64
		temp = Double.doubleToLongBits(lat);
62
		result = prime * result + (int) (temp ^ (temp >>> 32));
65
		result = prime * result + (int) (temp ^ (temp >>> 32));
63
		temp = Double.doubleToLongBits(lng);
66
		temp = Double.doubleToLongBits(lng);
64
		result = prime * result + (int) (temp ^ (temp >>> 32));
67
		result = prime * result + (int) (temp ^ (temp >>> 32));
65
		result = prime * result + locationId;
-
 
66
		result = prime * result + userId;
68
		result = prime * result + userId;
67
		return result;
69
		return result;
68
	}
70
	}
69
	@Override
71
	@Override
70
	public boolean equals(Object obj) {
72
	public boolean equals(Object obj) {
Line 78... Line 80...
78
		if (createTime == null) {
80
		if (createTime == null) {
79
			if (other.createTime != null)
81
			if (other.createTime != null)
80
				return false;
82
				return false;
81
		} else if (!createTime.equals(other.createTime))
83
		} else if (!createTime.equals(other.createTime))
82
			return false;
84
			return false;
-
 
85
		if (deviceId != other.deviceId)
-
 
86
			return false;
83
		if (gps != other.gps)
87
		if (gps != other.gps)
84
			return false;
88
			return false;
85
		if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat))
89
		if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat))
86
			return false;
90
			return false;
87
		if (Double.doubleToLongBits(lng) != Double.doubleToLongBits(other.lng))
91
		if (Double.doubleToLongBits(lng) != Double.doubleToLongBits(other.lng))
88
			return false;
92
			return false;
89
		if (locationId != other.locationId)
-
 
90
			return false;
-
 
91
		if (userId != other.userId)
93
		if (userId != other.userId)
92
			return false;
94
			return false;
93
		return true;
95
		return true;
94
	}
96
	}
95
	
97