public EMPLOYEE getCurrent() { EMPLOYEE p = new EMPLOYEE(); try { rowSet.moveToCurrentRow(); p.setEMPLOYEEId(rowSet.getInt("Emp_Id")); p.setemp_name(rowSet.getString("Emp_name")); p.setStreet(rowSet.getString("Street")); p.setCity(rowSet.getString("City")); p.setsalary(rowSet.getString("salary")); } catch (SQLException ex) { ex.printStackTrace(); } return p; }
public EMPLOYEE movePrevious() { EMPLOYEE p = new EMPLOYEE(); try { if (rowSet.previous() == false) rowSet.next(); p.setEMPLOYEEId(rowSet.getInt("Emp_Id")); p.setemp_name(rowSet.getString("Emp_name")); p.setStreet(rowSet.getString("Street")); p.setCity(rowSet.getString("City")); p.setsalary(rowSet.getString("salary")); } catch (SQLException ex) { ex.printStackTrace(); } return p; }