-
Notifications
You must be signed in to change notification settings - Fork 0
/
Avantage.java
64 lines (48 loc) · 1.19 KB
/
Avantage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package dev.paie.entite;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Avantage {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id_avantage", unique = true, nullable = false)
private Integer id;
@Column(name = "CODE", nullable = false)
private String code;
@Column(name = "NOM", nullable = false)
private String nom;
@Column(name = "MONTANT", nullable = false)
private BigDecimal montant;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public BigDecimal getMontant() {
return montant;
}
public void setMontant(BigDecimal montant) {
this.montant = montant;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public boolean equals(Avantage av) {
return this.code.equals(av.getCode()) && this.nom.equals(av.getNom())
&& this.montant.compareTo(av.getMontant()) == 0;
}
}