118 lines
3.0 KiB
Java
118 lines
3.0 KiB
Java
|
||
public class EmployeeData {
|
||
// public static void main(String args[]) {
|
||
|
||
private String idEmployee;
|
||
private String nmEmployee;
|
||
private String knEmployee;
|
||
private String mailAddress;
|
||
private String password;
|
||
private String idDepartment;
|
||
|
||
// boolean isMatchID = isMatchId(idEmployee);//IdEmployeeが一致するか判断
|
||
|
||
//idEmployee「ID」を取得するgetter
|
||
public String getIdEmployee() {
|
||
return idEmployee;
|
||
}
|
||
//idEmployee「ID」を設定するsetter
|
||
public void setIdEmployee(String idEmployee) {
|
||
this.idEmployee = idEmployee;
|
||
}
|
||
|
||
//nmEmployee「名前」を取得するgetter
|
||
public String getNmEmployee() {
|
||
return nmEmployee;
|
||
}
|
||
//nmEmployee「名前」を設定するsetter
|
||
public void setNmEmployee(String nmEmployee) {
|
||
this.nmEmployee = nmEmployee;
|
||
}
|
||
|
||
//getKnEmployee「カタカナの名前」を取得するgetter
|
||
public String getKnEmployee() {
|
||
return knEmployee;
|
||
}
|
||
//getKnEmployee「カタカナの名前」を設定するsetter
|
||
public void setKnEmployee(String knEmployee) {
|
||
this.knEmployee = knEmployee;
|
||
}
|
||
|
||
//メールアドレスを取得するgetter
|
||
public String getMailAddress() {
|
||
return mailAddress;
|
||
}
|
||
//メールアドレスを設定するsetter
|
||
public void setMailAddress(String mailAddress) {
|
||
this.mailAddress = mailAddress;
|
||
}
|
||
|
||
//パスワードを取得するgetter
|
||
public String getPassword() {
|
||
return password;
|
||
}
|
||
//パスワードを取得するsetter
|
||
public void setPassword(String password) {
|
||
this.password = password;
|
||
}
|
||
|
||
//IdDepartmentを設定するgetter
|
||
public String getIdDepartment() {
|
||
return idDepartment;
|
||
}
|
||
//IdDepartmentを取得するsetter
|
||
public void setIdDepartment(String idDepartment) {
|
||
this.idDepartment = idDepartment;
|
||
}
|
||
|
||
//メソッド名:isMatchId 引数:String id 戻り値:boolean ID一致ならtrue,違えばfalse
|
||
public boolean isMatchId(String id) {
|
||
return this.idEmployee.equals(id);
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
public EmployeeData(String idEmployee, String nmEmployee,
|
||
String knEmployee, String mailAddress, String password, String idDepartment) {
|
||
this.idEmployee = idEmployee;
|
||
this.nmEmployee = nmEmployee;
|
||
this.knEmployee = knEmployee;
|
||
this.mailAddress = mailAddress;
|
||
this.password = password;
|
||
this.idDepartment = idDepartment;
|
||
}
|
||
|
||
// public boolean isMatchId(String id) {
|
||
//// if(idEmployee equals )
|
||
// {
|
||
//
|
||
// }
|
||
//
|
||
// }
|
||
|
||
|
||
// public String Employee(String idEmployee) {
|
||
// this.idEmployee= idEmployee;
|
||
// }
|
||
|
||
public EmployeeData() {
|
||
// TODO 自動生成されたコンストラクター・スタブ
|
||
}
|
||
|
||
void showinfo() { //showinfo->toStringにメソッド名変更 + アクセス修飾子publicつける
|
||
// this.idEmployee = idEmployee;
|
||
System.out.println(this.idEmployee + "\t" + this.nmEmployee + "\t" + this.knEmployee + "\t" + this.mailAddress
|
||
+ "\t" + this.password + "\t" + this.idDepartment);
|
||
|
||
}
|
||
@Override
|
||
public String toString() {
|
||
return (this.idEmployee +"\t" + this.nmEmployee + "\t" + this.knEmployee + "\t" + this.mailAddress
|
||
+ "\t" + this.password + "\t" + this.idDepartment);
|
||
|
||
}
|
||
|
||
}
|