X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FdbObjects%2FAssurance.java;h=cb0bcc49d85d70dbcb4d8711fb2d0374a8c736c7;hb=ba0e2099f18fc222c05abb0e293c2eb1bb01f0e9;hp=b1c9ccd507c79fc4981ea7d364ff8280e67a7f79;hpb=e409ba881965634f63f0b67824bc93dda4ec4327;p=gigi.git diff --git a/src/org/cacert/gigi/dbObjects/Assurance.java b/src/org/cacert/gigi/dbObjects/Assurance.java index b1c9ccd5..cb0bcc49 100644 --- a/src/org/cacert/gigi/dbObjects/Assurance.java +++ b/src/org/cacert/gigi/dbObjects/Assurance.java @@ -1,10 +1,25 @@ package org.cacert.gigi.dbObjects; -import java.sql.ResultSet; -import java.sql.SQLException; - +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"); + + private final String description; + + private AssuranceType(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } + } + private int id; private User from; @@ -19,15 +34,15 @@ public class Assurance { private String date; - public Assurance(ResultSet result) throws SQLException { + public Assurance(GigiResultSet res) { super(); - this.id = result.getInt("id"); - this.from = User.getById(result.getInt("from")); - this.to = User.getById(result.getInt("to")); - this.location = result.getString("location"); - this.method = result.getString("method"); - this.points = result.getInt("points"); - this.date = result.getString("date"); + 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"); } public User getFrom() {