]> WPIA git - gigi.git/blob - src/org/cacert/gigi/dbObjects/Assurance.java
ADD: A step towards a more friendly SQL API.
[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     private int id;
8
9     private User from;
10
11     private User to;
12
13     private String location;
14
15     private String method;
16
17     private int points;
18
19     private String date;
20
21     public Assurance(GigiResultSet res) {
22         super();
23         this.id = res.getInt("id");
24         this.from = User.getById(res.getInt("from"));
25         this.to = User.getById(res.getInt("to"));
26         this.location = res.getString("location");
27         this.method = res.getString("method");
28         this.points = res.getInt("points");
29         this.date = res.getString("date");
30     }
31
32     public User getFrom() {
33         return from;
34     }
35
36     public int getId() {
37         return id;
38     }
39
40     public String getLocation() {
41         return location;
42     }
43
44     public int getPoints() {
45         return points;
46     }
47
48     public User getTo() {
49         return to;
50     }
51
52     public String getMethod() {
53         return method;
54     }
55
56     public String getDate() {
57         return date;
58     }
59
60 }