Last change
on this file since 843a941 was 9dd526f, checked in by andrejTavchioski <andrej.tavchioski@…>, 3 years ago |
backend refactoring
|
-
Property mode
set to
100644
|
File size:
987 bytes
|
Line | |
---|
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 |
|
---|
21 | private float lng;
|
---|
22 |
|
---|
23 | private float lat;
|
---|
24 |
|
---|
25 | public Location(){}
|
---|
26 |
|
---|
27 | public Location(float lng, float lat) {
|
---|
28 | this.lng = lng;
|
---|
29 | this.lat = lat;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public float getLng() {
|
---|
33 | return lng;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void setLng(float lng) {
|
---|
37 | this.lng = lng;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public float getLat() {
|
---|
41 | return lat;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public void setLat(float lat) {
|
---|
45 | this.lat = lat;
|
---|
46 | }
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.