]> WPIA git - gigi.git/blob - src/org/cacert/gigi/dbObjects/Assurance.java
UPD: minor consistency cleanups
[gigi.git] / src / org / cacert / gigi / dbObjects / Assurance.java
1 package org.cacert.gigi.dbObjects;
2
3 import org.cacert.gigi.database.GigiResultSet;
4 import org.cacert.gigi.dbObjects.wrappers.DataContainer;
5
6 @DataContainer
7 public class Assurance {
8
9     public enum AssuranceType {
10         FACE_TO_FACE("Face to Face Meeting"), TOPUP("TOPUP"), TTP_ASSISTED("TTP-Assisted");
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
23     private int id;
24
25     private User from;
26
27     private User to;
28
29     private String location;
30
31     private String method;
32
33     private int points;
34
35     private String date;
36
37     public Assurance(GigiResultSet res) {
38         super();
39         this.id = res.getInt("id");
40         this.from = User.getById(res.getInt("from"));
41         this.to = User.getById(res.getInt("to"));
42         this.location = res.getString("location");
43         this.method = res.getString("method");
44         this.points = res.getInt("points");
45         this.date = res.getString("date");
46     }
47
48     public User getFrom() {
49         return from;
50     }
51
52     public int getId() {
53         return id;
54     }
55
56     public String getLocation() {
57         return location;
58     }
59
60     public int getPoints() {
61         return points;
62     }
63
64     public User getTo() {
65         return to;
66     }
67
68     public String getMethod() {
69         return method;
70     }
71
72     public String getDate() {
73         return date;
74     }
75
76 }