mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-11-22 08:13:20 +00:00
Correction attr clss Product : "id" de type long et "price" de type double
This commit is contained in:
parent
e4049434ed
commit
3b30621075
@ -10,12 +10,12 @@ import java.util.List;
|
|||||||
* Created by Notmoo on 18/07/2017.
|
* Created by Notmoo on 18/07/2017.
|
||||||
*/
|
*/
|
||||||
public class Product implements ILoggable, Serializable{
|
public class Product implements ILoggable, Serializable{
|
||||||
private int id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
private int amountRemaining;
|
private int amountRemaining;
|
||||||
private int amountSold;
|
private int amountSold;
|
||||||
private boolean sellable;
|
private boolean sellable;
|
||||||
private boolean price;
|
private double price;
|
||||||
private List<Product> components;
|
private List<Product> components;
|
||||||
private Category category;
|
private Category category;
|
||||||
|
|
||||||
@ -23,22 +23,25 @@ public class Product implements ILoggable, Serializable{
|
|||||||
components = new ArrayList<>();
|
components = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Product(int id, String name, int amountRemaining, int amountSold, boolean sellable, boolean price, List<Product> components, Category category) {
|
public Product(long id, String name, int amountRemaining, int amountSold, boolean sellable, double price, List<Product> components, Category category) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.amountRemaining = amountRemaining;
|
this.amountRemaining = amountRemaining;
|
||||||
this.amountSold = amountSold;
|
this.amountSold = amountSold;
|
||||||
this.sellable = sellable;
|
this.sellable = sellable;
|
||||||
this.price = price;
|
this.price = price;
|
||||||
this.components = components;
|
|
||||||
this.category = category;
|
this.category = category;
|
||||||
|
this.components = new ArrayList<>();
|
||||||
|
if(components!=null){
|
||||||
|
this.components.addAll(components);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(int id) {
|
public void setId(long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,11 +77,11 @@ public class Product implements ILoggable, Serializable{
|
|||||||
this.sellable = sellable;
|
this.sellable = sellable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrice() {
|
public double getPrice() {
|
||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrice(boolean price) {
|
public void setPrice(double price) {
|
||||||
this.price = price;
|
this.price = price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user