]> WPIA git - gigi.git/blob - src/org/cacert/gigi/dbObjects/Assurance.java
33dbf1ed5e26fcfbcf593214906b3332467aff7f
[gigi.git] / src / org / cacert / gigi / dbObjects / Assurance.java
1 package org.cacert.gigi.dbObjects;
2
3 import org.cacert.gigi.database.DBEnum;
4 import org.cacert.gigi.dbObjects.wrappers.DataContainer;
5
6 @DataContainer
7 public class Assurance {
8
9     public enum AssuranceType implements DBEnum {
10         FACE_TO_FACE("Face to Face Meeting"), TOPUP("TOPUP"), TTP_ASSISTED("TTP-Assisted"), NUCLEUS("Nucleus Bonus");
11
12         private final String description;
13
14         private AssuranceType(String description) {
15             this.description = description;
16         }
17
18         public String getDescription() {
19             return description;
20         }
21
22         @Override
23         public String getDBName() {
24             return description;
25         }
26     }
27
28     private int id;
29
30     private User from;
31
32     private Name to;
33
34     private String location;
35
36     private String method;
37
38     private int points;
39
40     private String date;
41
42     private Country country;
43
44     public Assurance(int id, User from, Name to, String location, String method, int points, String date, Country country) {
45         this.id = id;
46         this.from = from;
47         this.to = to;
48         this.location = location;
49         this.method = method;
50         this.points = points;
51         this.date = date;
52         this.country = country;
53
54     }
55
56     public User getFrom() {
57         return from;
58     }
59
60     public int getId() {
61         return id;
62     }
63
64     public String getLocation() {
65         return location;
66     }
67
68     public int getPoints() {
69         return points;
70     }
71
72     public Name getTo() {
73         return to;
74     }
75
76     public String getMethod() {
77         return method;
78     }
79
80     public String getDate() {
81         return date;
82     }
83
84     public Country getCountry() {
85         return country;
86     }
87 }