Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by elsemTim on 15.11.2016.
- */
- import java.text.DateFormat;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.text.Collator;
- import java.util.Date;
- import java.util.Locale;
- public class Department {
- private int ID;
- private String nameDepartment;
- private String mail;
- private String phone;
- public Department (ResultSet rs) throws SQLException{
- SetID(rs.getInt(0));
- SetNameDepartment(rs.getString(1));
- SetMail(rs.getString(2));
- SetPhone(rs.getString(3));
- }
- //set
- public void SetID( int ID ){
- this.ID=ID;
- }
- public void SetNameDepartment( String nameDepartment){
- this.nameDepartment=nameDepartment;
- }
- public void SetMail( String mail ){
- this.mail=mail;
- }
- public void SetPhone( String phone ){
- this.phone=phone;
- }
- //get
- public int GetID(){
- return ID;
- }
- public String GetNameDepartment(){
- return nameDepartment;
- }
- public String GetMail(){
- return mail;
- }
- public String GetPhone(){
- return phone;
- }
- //Метод возвращает все данные в виде строки
- //public String toString()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement