Blame view

src/main/java/fr/plil/sio/web/mvc/Dette.java 2 KB
353d9d4f   Zak   désactivation des...
1
2
  package fr.plil.sio.web.mvc;
  
c1d2852e   Zak   Ajout css
3
  import com.fasterxml.jackson.annotation.JsonManagedReference;
353d9d4f   Zak   désactivation des...
4
5
6
7
8
9
10
11
12
13
  import java.util.Objects;
  import javax.persistence.*;
  
  
  @Entity
  public class Dette {
      
      @Id
      @GeneratedValue(strategy= GenerationType.AUTO)
      private Long id;
8a362652   Zak   Ajout css, js et ...
14
15
16
17
18
19
20
21
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
353d9d4f   Zak   désactivation des...
22
23
24
25
26
27
      
      @Column
      private Double sommeDette;
  
          
      @ManyToOne(optional = false)
c1d2852e   Zak   Ajout css
28
      @JsonManagedReference
716532ee   Zak   Modifications des...
29
      private User creditor;
353d9d4f   Zak   désactivation des...
30
31
      
      @ManyToOne(optional = false)
c1d2852e   Zak   Ajout css
32
      @JsonManagedReference
716532ee   Zak   Modifications des...
33
      private User borrower;
353d9d4f   Zak   désactivation des...
34
  
353d9d4f   Zak   désactivation des...
35
36
      @Override
      public int hashCode() {
716532ee   Zak   Modifications des...
37
38
39
40
          int hash = 7;
          hash = 97 * hash + Objects.hashCode(this.sommeDette);
          hash = 97 * hash + Objects.hashCode(this.creditor);
          hash = 97 * hash + Objects.hashCode(this.borrower);
353d9d4f   Zak   désactivation des...
41
42
43
44
45
46
47
48
49
50
51
52
          return hash;
      }
  
      @Override
      public boolean equals(Object obj) {
          if (obj == null) {
              return false;
          }
          if (getClass() != obj.getClass()) {
              return false;
          }
          final Dette other = (Dette) obj;
716532ee   Zak   Modifications des...
53
54
55
          if (!Objects.equals(this.id, other.id)) {
              return false;
          }
353d9d4f   Zak   désactivation des...
56
57
58
          if (!Objects.equals(this.sommeDette, other.sommeDette)) {
              return false;
          }
716532ee   Zak   Modifications des...
59
          if (!Objects.equals(this.creditor, other.creditor)) {
353d9d4f   Zak   désactivation des...
60
61
              return false;
          }
716532ee   Zak   Modifications des...
62
          if (!Objects.equals(this.borrower, other.borrower)) {
353d9d4f   Zak   désactivation des...
63
64
65
66
67
              return false;
          }
          return true;
      }
  
716532ee   Zak   Modifications des...
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
      public User getCreditor() {
          return creditor;
      }
  
      public void setCreditor(User creditor) {
          this.creditor = creditor;
      }
  
      public User getBorrower() {
          return borrower;
      }
  
      public void setBorrower(User borrower) {
          this.borrower = borrower;
      }
      
       public Double getSommeDette() {
          return sommeDette;
      }
  
      public void setSommeDette(Double sommeDette) {
          this.sommeDette = sommeDette;
      }
                   
353d9d4f   Zak   désactivation des...
92
93
94
95
96
97
98
99
  
  
  
  
      
      
      
  }