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