tie UI Student table to database student table
[se-panther.git] / gui-playground / src / panther / db / Student.java
blob78aaea64e899e38d48b75fa5133c9d45df751879
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 get_id()
37 { return id; }