source: sources/app/src/main/java/parkup/entities/ParkingSpace.java@ ce6ad22

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

v1 initial prototype

  • Property mode set to 100644
File size: 1.8 KB
Line 
1package parkup.entities;
2
3import javax.persistence.*;
4
5@Entity
6@Table(name = "parking_space")
7public class ParkingSpace {
8 @Id
9 @Column(name = "parking_space_id")
10 @SequenceGenerator(
11 name="parking_space_generator",
12 sequenceName = "parking_space_sequence",
13 allocationSize = 1,
14 initialValue = 600
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 = "parking_space_sequence_generator"
19 )
20 private int psId;
21
22 @Column(name = "psName")
23 private String psName;
24
25 @Column(name = "isTaken")
26 private boolean isTaken;
27
28 @Column(name = "isHandicaped")
29 private boolean isHandicaped;
30
31 public ParkingSpace() {}
32
33 public ParkingSpace(int psId, String psName, boolean isTaken, boolean isHandicaped) {
34 this.psId = psId;
35 this.psName = psName;
36 this.isTaken = isTaken;
37 this.isHandicaped = isHandicaped;
38 }
39
40 public ParkingSpace(String psName, boolean isTaken, boolean isHandicaped) {
41 this.psName = psName;
42 this.isTaken = isTaken;
43 this.isHandicaped = isHandicaped;
44 }
45
46 public int getPsId() {
47 return this.psId;
48 }
49
50 public void setPsId(int psId) {
51 this.psId = psId;
52 }
53
54 public String getPsName() {
55 return this.psName;
56 }
57
58 public void setPsName(String psName) {
59 this.psName = psName;
60 }
61
62 public boolean isTaken() {
63 return this.isTaken;
64 }
65
66 public void setTaken(boolean isTaken) {
67 this.isTaken = isTaken;
68 }
69
70 public boolean isHandicaped() {
71 return this.isHandicaped;
72 }
73
74 public void setHandicaped(boolean isHandicaped) {
75 this.isHandicaped = isHandicaped;
76 }
77}
78
Note: See TracBrowser for help on using the repository browser.