X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FdbObjects%2FAssurance.java;fp=src%2Forg%2Fcacert%2Fgigi%2FdbObjects%2FAssurance.java;h=b1c9ccd507c79fc4981ea7d364ff8280e67a7f79;hp=0000000000000000000000000000000000000000;hb=e409ba881965634f63f0b67824bc93dda4ec4327;hpb=231b0e94c013f955d3ab3b6c2ecab6908b2b9ca8 diff --git a/src/org/cacert/gigi/dbObjects/Assurance.java b/src/org/cacert/gigi/dbObjects/Assurance.java new file mode 100644 index 00000000..b1c9ccd5 --- /dev/null +++ b/src/org/cacert/gigi/dbObjects/Assurance.java @@ -0,0 +1,61 @@ +package org.cacert.gigi.dbObjects; + +import java.sql.ResultSet; +import java.sql.SQLException; + + +public class Assurance { + private int id; + + private User from; + + private User to; + + private String location; + + private String method; + + private int points; + + private String date; + + public Assurance(ResultSet result) throws SQLException { + 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"); + } + + public User getFrom() { + return from; + } + + public int getId() { + return id; + } + + public String getLocation() { + return location; + } + + public int getPoints() { + return points; + } + + public User getTo() { + return to; + } + + public String getMethod() { + return method; + } + + public String getDate() { + return date; + } + +}