Ignore:
Timestamp:
02/02/22 17:25:17 (2 years ago)
Author:
andrejTavchioski <andrej.tavchioski@…>
Branches:
master
Children:
98f448a
Parents:
9dd526f
Message:

updateParkingZone fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/app/src/main/java/parkup/data/ParkingZoneAdminView.java

    r9dd526f rdf4089c  
    22
    33import parkup.entities.ParkingSpace;
     4import parkup.entities.ParkingZone;
    45
    56import java.util.List;
     
    910    private String pzName;
    1011    private int price;
    11     private int time_from;
    12     private int time_to;
     12    private int from;
     13    private int to;
    1314    private String address;
    1415    private String color;
    1516    private List<ParkingSpace> parkingSpaces;
    1617    private ParkingZoneLocation parkingZoneLocation;
    17     private List<Integer> responsibleWorkers;
     18    private List<WorkerDemo> responsibleWorkers;
    1819
    19     public ParkingZoneAdminView(int pzId, String pzName, int price, int time_from, int time_to, String address, String color, List<ParkingSpace> parkingSpaces, ParkingZoneLocation parkingZoneLocation, List<Integer> responsibleWorkers) {
    20         this.pzId = pzId;
    21         this.pzName = pzName;
    22         this.price = price;
    23         this.time_from = time_from;
    24         this.time_to = time_to;
    25         this.address = address;
    26         this.color = color;
    27         this.parkingSpaces = parkingSpaces;
    28         this.parkingZoneLocation = parkingZoneLocation;
     20    public ParkingZoneAdminView(ParkingZone pz,List<WorkerDemo> responsibleWorkers) {
     21        this.pzId = pz.getId();
     22        this.pzName = pz.getPzName();
     23        this.price = pz.getPrice();
     24        this.from = pz.getFrom();
     25        this.to = pz.getTo();
     26        this.address = pz.getAddress();
     27        this.color = pz.getColor();
     28        this.parkingSpaces = pz.getParkingSpaces();
     29        this.parkingZoneLocation = pz.getParkingZoneLocation();
    2930        this.responsibleWorkers = responsibleWorkers;
    3031    }
    3132
    3233    public ParkingZoneAdminView() {}
     34
     35
    3336
    3437    public int getPzId() {
     
    5659    }
    5760
    58     public int getTime_from() {
    59         return time_from;
     61    public int getFrom() {
     62        return from;
    6063    }
    6164
    62     public void setTime_from(int time_from) {
    63         this.time_from = time_from;
     65    public void setFrom(int from) {
     66        this.from = from;
    6467    }
    6568
    66     public int getTime_to() {
    67         return time_to;
     69    public int getTo() {
     70        return to;
    6871    }
    6972
    70     public void setTime_to(int time_to) {
    71         this.time_to = time_to;
     73    public void setTo(int to) {
     74        this.to = to;
    7275    }
    7376
     
    104107    }
    105108
    106     public List<Integer> getResponsibleWorkers() {
     109    public List<WorkerDemo> getResponsibleWorkers() {
    107110        return responsibleWorkers;
    108111    }
    109112
    110     public void setResponsibleWorkers(List<Integer> responsibleWorkers) {
     113    public void setResponsibleWorkers(List<WorkerDemo> responsibleWorkers) {
    111114        this.responsibleWorkers = responsibleWorkers;
    112115    }
Note: See TracChangeset for help on using the changeset viewer.