gui-playground: move mysql logic into its own module
[se-panther.git] / gui-playground / src / panther / db / Student.java
blob835369f3dabc18350d3e9423a0bbbd533552e0cc
1 package panther.db;
3 import java.util.*;
4 import java.sql.*;
6 public class Student
8 private int id;
9 private String fname;
10 private String lname;
11 private int year;
12 private String email;
14 public Student(ResultSet rs)
15 throws SQLException
17 id = rs.getInt("idStudent");
18 fname = rs.getString("FName");
19 lname = rs.getString("LName");
20 year = rs.getInt("Year");
21 email =rs.getString("email");
24 public String toString()
26 StringBuilder sb = new StringBuilder();
28 sb.append(id).append(" ").append(lname).append(", ").append(fname);
30 return sb.toString();
33 // public String getName()
34 // { return name; }
36 public int getId()
37 { return id; }