public Teacher(ResultSet rs) throws Exception{
        rs.beforeFirst();
        if(rs.next()){
            setPersonID(rs.getInt("personid"));
            setLastName(rs.getString("lastname"));
            setFirstName(rs.getString("firstname"));
            setEmail(rs.getString("email"));
            setPersonType(rs.getString("persontype"));
            setPersonTypeID(1);
        }
        if(!getPersonType().equals("teacher")){
            throw new Exception("tried to load another persontype into a teacher");
        }
    }