Ignore:
Timestamp:
12/24/21 23:31:23 (3 years ago)
Author:
andrejTavchioski <andrej.tavchioski@…>
Branches:
master
Children:
9dd526f
Parents:
8588fcb
Message:

Fixed some functionalities related to parkingSessions and parkingZones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/app/src/main/java/parkup/entities/ParkingZone.java

    r8588fcb r9ff45d6  
    3030    private int price;
    3131
     32    @Transient
    3233    @Column(name = "capacity")
    3334    private int capacity;
    34 
    35 <<<<<<< HEAD
    3635    @Column(name = "time_from")  //za rabotni casovi od:
    3736    private int from;
    3837
    3938    @Column(name = "time_to")    //za rabotni casovi do:
    40 =======
    41     @Column(name = "vreme_od")  //za rabotni casovi od:
    42     private int from;
    43 
    44     @Column(name = "vreme_do")    //za rabotni casovi do:
    45 >>>>>>> 9504a097ce80831ea7e7130dff7215d5fbf8e939
    4639    private int to;
    4740
    48     @Column(name = "lokacija")
    49     private String location;
     41    @Column(name = "address")
     42    private String address;
    5043
     44    @Transient
    5145    @Column(name = "zafateniMesta")
    52     private int zafateniMesta;
     46    private int takenSpaces;
    5347
    5448    @Column(name = "color")
    5549    private String color;
    5650
    57     @ManyToMany(cascade = {CascadeType.ALL})
    58     @JoinColumn(name="odgovorniLica",nullable = true)
    59     private List<Vraboten> odgovorniLica;
     51//    @ManyToMany(cascade = {CascadeType.ALL})
     52//    private List<Vraboten> odgovorniLica;
    6053
    61     @OneToMany(cascade = {CascadeType.ALL})
     54    @OneToMany(cascade = {CascadeType.MERGE})
    6255    private List<ParkingSpace> parkingSpaces;
     56
     57
    6358
    6459    @OneToOne(cascade = {CascadeType.ALL})
     
    6661
    6762   public ParkingZone() {
    68        this.zafateniMesta = 0;
     63       this.takenSpaces = 0;
    6964       this.parkingSpaces = new ArrayList<ParkingSpace>();
    7065   }
     
    7267    public ParkingZone(String pzName) {
    7368        this.pzName = pzName;
    74         this.zafateniMesta = 0;
     69        this.takenSpaces = 0;
    7570        this.parkingSpaces = new ArrayList<ParkingSpace>();
    7671    }
    7772
    78     public ParkingZone(int pzId, String pzName, int price, int capacity, String location, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
     73    public ParkingZone(int pzId, String pzName, int price, int capacity, String address, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
    7974        this.pzId = pzId;
    8075        this.pzName = pzName;
    8176        this.price = price;
    8277        this.capacity = capacity;
    83         this.location = location;
    84         this.zafateniMesta = 0;
     78        this.address = address;
     79        this.takenSpaces = 0;
    8580        this.parkingSpaces = parkingSpaces;
    8681        this.color = color;
     
    8984    }
    9085
    91     public ParkingZone(String pzName, int price, int capacity, String location, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
     86    public ParkingZone(String pzName, int price, int capacity, String address, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
    9287        this.pzName = pzName;
    9388        this.price = price;
    9489        this.capacity = capacity;
    95         this.location = location;
    96         this.zafateniMesta = 0;
     90        this.address = address;
     91        this.takenSpaces = 0;
    9792        this.parkingSpaces = parkingSpaces;
    9893        this.color = color;
     
    133128    }
    134129
    135     public String getLocation() {
    136         return this.location;
     130    public String getAddress() {
     131        return this.address;
    137132    }
    138133
    139     public void setLocation(String location) {
    140         this.location = location;
     134    public void setAddress(String location) {
     135        this.address = location;
    141136    }
    142137
    143     public int getZafateniMesta() {return zafateniMesta;}
     138    public int getTakenSpaces() {return takenSpaces;}
    144139
    145     public void setZafateniMesta(int zafateniMesta) {this.zafateniMesta = zafateniMesta;}
     140    public void setTakenSpaces(int takenSpaces) {this.takenSpaces = takenSpaces;}
    146141
    147142    public List<ParkingSpace> getParkingSpaces() {return parkingSpaces;}
     
    181176    }
    182177
    183     public List<Vraboten> getOdgovorniLica() {
    184         return odgovorniLica;
    185     }
    186 
    187     public void setOdgovorniLica(List<Vraboten> odgovorniLica) {
    188         this.odgovorniLica = odgovorniLica;
    189     }
     178    //    public List<Vraboten> getOdgovorniLica() {
     179//        return odgovorniLica;
     180//    }
     181//
     182//    public void setOdgovorniLica(List<Vraboten> odgovorniLica) {
     183//        this.odgovorniLica = odgovorniLica;
     184//    }
    190185}
Note: See TracChangeset for help on using the changeset viewer.