X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FdbObjects%2FAssurance.java;h=f3940ebb5d089bce86dcc697a9115981b2106be4;hb=0b0db3d1f59e3473fad2d8011f75552b7de1671e;hp=cb0bcc49d85d70dbcb4d8711fb2d0374a8c736c7;hpb=b47144d6f3bf6b6eb1ec477de9d2af38256f074f;p=gigi.git diff --git a/src/org/cacert/gigi/dbObjects/Assurance.java b/src/org/cacert/gigi/dbObjects/Assurance.java index cb0bcc49..f3940ebb 100644 --- a/src/org/cacert/gigi/dbObjects/Assurance.java +++ b/src/org/cacert/gigi/dbObjects/Assurance.java @@ -1,13 +1,12 @@ package org.cacert.gigi.dbObjects; -import org.cacert.gigi.database.GigiResultSet; import org.cacert.gigi.dbObjects.wrappers.DataContainer; @DataContainer public class Assurance { public enum AssuranceType { - FACE_TO_FACE("Face to Face Meeting"), TOPUP("TOPUP"), TTP_ASSISTED("TTP-Assisted"); + FACE_TO_FACE("Face to Face Meeting"), TOPUP("TOPUP"), TTP_ASSISTED("TTP-Assisted"), NUCLEUS("Nucleus Bonus"); private final String description; @@ -24,7 +23,7 @@ public class Assurance { private User from; - private User to; + private Name to; private String location; @@ -34,15 +33,18 @@ public class Assurance { private String date; - public Assurance(GigiResultSet res) { - super(); - this.id = res.getInt("id"); - this.from = User.getById(res.getInt("from")); - this.to = User.getById(res.getInt("to")); - this.location = res.getString("location"); - this.method = res.getString("method"); - this.points = res.getInt("points"); - this.date = res.getString("date"); + private Country country; + + public Assurance(int id, User from, Name to, String location, String method, int points, String date, Country country) { + this.id = id; + this.from = from; + this.to = to; + this.location = location; + this.method = method; + this.points = points; + this.date = date; + this.country = country; + } public User getFrom() { @@ -61,7 +63,7 @@ public class Assurance { return points; } - public User getTo() { + public Name getTo() { return to; } @@ -73,4 +75,7 @@ public class Assurance { return date; } + public Country getCountry() { + return country; + } }