Last change
on this file since c45b67b was 9dd526f, checked in by andrejTavchioski <andrej.tavchioski@…>, 3 years ago |
backend refactoring
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | package parkup.data;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 | import java.util.List;
|
---|
5 |
|
---|
6 | @Entity
|
---|
7 | public class ParkingZoneLocation {
|
---|
8 | @Id
|
---|
9 | @Column(name = "parkingZoneLocation_id")
|
---|
10 | @SequenceGenerator(
|
---|
11 | name="parkingZoneLocation_sequence_generator",
|
---|
12 | sequenceName = "parkingZoneLocation_sequence",
|
---|
13 | allocationSize = 1,
|
---|
14 | initialValue = 1400
|
---|
15 | )
|
---|
16 | @GeneratedValue( //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
|
---|
17 | strategy = GenerationType.SEQUENCE,
|
---|
18 | generator = "parkingZoneLocation_sequence_generator"
|
---|
19 | )
|
---|
20 | private int parkingZoneLocationId;
|
---|
21 |
|
---|
22 | @OneToOne(cascade = {CascadeType.ALL})
|
---|
23 | private Location centre;
|
---|
24 |
|
---|
25 | @OneToMany(cascade = {CascadeType.ALL})
|
---|
26 | private List<Location> coords;
|
---|
27 |
|
---|
28 | public ParkingZoneLocation(int parkingZoneLocationId, Location centre, List<Location> coords) {
|
---|
29 | this.parkingZoneLocationId = parkingZoneLocationId;
|
---|
30 | this.centre = centre;
|
---|
31 | this.coords = coords;
|
---|
32 | }
|
---|
33 |
|
---|
34 | public ParkingZoneLocation(Location centre, List<Location> coords) {
|
---|
35 | this.centre = centre;
|
---|
36 | this.coords = coords;
|
---|
37 | }
|
---|
38 |
|
---|
39 | public ParkingZoneLocation() {}
|
---|
40 |
|
---|
41 | public Location getCentre() {
|
---|
42 | return centre;
|
---|
43 | }
|
---|
44 |
|
---|
45 | public void setCentre(Location centre) {
|
---|
46 | this.centre = centre;
|
---|
47 | }
|
---|
48 |
|
---|
49 | public List<Location> getCoords() {
|
---|
50 | return coords;
|
---|
51 | }
|
---|
52 |
|
---|
53 | public void setCoords(List<Location> teminja) {
|
---|
54 | this.coords = teminja;
|
---|
55 | }
|
---|
56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.