source:
sources/app/src/main/java/parkup/data/Location.java@
bfc49f4
Last change on this file since bfc49f4 was 9dd526f, checked in by , 3 years ago | |
---|---|
|
|
File size: 987 bytes |
Rev | Line | |
---|---|---|
[97fbc67] | 1 | package parkup.data; |
2 | ||
3 | import javax.persistence.*; | |
4 | ||
5 | @Entity | |
6 | public class Location { | |
7 | @Id | |
8 | @Column(name = "location_id") | |
9 | @SequenceGenerator( | |
10 | name="location_sequence_generator", | |
11 | sequenceName = "location_sequence", | |
12 | allocationSize = 1, | |
13 | initialValue = 1300 | |
14 | ) | |
15 | @GeneratedValue( //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e | |
16 | strategy = GenerationType.SEQUENCE, | |
17 | generator = "location_sequence_generator" | |
18 | ) | |
19 | private int locationId; | |
20 | ||
[9dd526f] | 21 | private float lng; |
[97fbc67] | 22 | |
[9dd526f] | 23 | private float lat; |
[97fbc67] | 24 | |
25 | public Location(){} | |
26 | ||
[9dd526f] | 27 | public Location(float lng, float lat) { |
28 | this.lng = lng; | |
29 | this.lat = lat; | |
[97fbc67] | 30 | } |
31 | ||
[9dd526f] | 32 | public float getLng() { |
33 | return lng; | |
[97fbc67] | 34 | } |
35 | ||
[9dd526f] | 36 | public void setLng(float lng) { |
37 | this.lng = lng; | |
[97fbc67] | 38 | } |
39 | ||
[9dd526f] | 40 | public float getLat() { |
41 | return lat; | |
[97fbc67] | 42 | } |
43 | ||
[9dd526f] | 44 | public void setLat(float lat) { |
45 | this.lat = lat; | |
[97fbc67] | 46 | } |
47 | } |
Note:
See TracBrowser
for help on using the repository browser.