source: sources/app/src/main/java/parkup/data/Location.java@ f6bc52d

Last change on this file since f6bc52d was f6bc52d, checked in by DavidTrajkovski <davidtrajkovski11@…>, 3 years ago

fixed delete methods

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package parkup.data;
2
3import javax.persistence.*;
4
5@Entity
6public 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 longitude;
22
23 private float latitude;
24
25 public Location(){}
26
27 public Location(float longtitude, float latitude) {
28 this.longitude = longtitude;
29 this.latitude = latitude;
30 }
31
32 public float getLongitude() {
33 return longitude;
34 }
35
36 public void setLongitude(float longitude) {
37 this.longitude = longitude;
38 }
39
40 public float getLatitude() {
41 return latitude;
42 }
43
44 public void setLatitude(float latitude) {
45 this.latitude = latitude;
46 }
47}
Note: See TracBrowser for help on using the repository browser.