新規作成
This commit is contained in:
22
src/com/rhizome/example/data/BaseData.java
Normal file
22
src/com/rhizome/example/data/BaseData.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.rhizome.example.data;
|
||||
|
||||
public abstract class BaseData {
|
||||
/**
|
||||
* インスタンスのフィールドの値をタブ区切りで連結して返却
|
||||
* @return タブ区切り文字列
|
||||
*/
|
||||
public abstract String toString();
|
||||
|
||||
/**
|
||||
* インスタンスのフィールドの値をカンマ区切りで連結して返却
|
||||
* @return CSV形式文字列
|
||||
*/
|
||||
public abstract String toCSV();
|
||||
|
||||
/**
|
||||
* ファイルの主キーの値を取得
|
||||
* @return 主キーの値
|
||||
*/
|
||||
public abstract String getPrimaryKeyValue();
|
||||
|
||||
}
|
||||
123
src/com/rhizome/example/data/EmployeeData.java
Normal file
123
src/com/rhizome/example/data/EmployeeData.java
Normal file
@@ -0,0 +1,123 @@
|
||||
package com.rhizome.example.data;
|
||||
|
||||
public class EmployeeData extends BaseData {
|
||||
/** 社員ID */
|
||||
private String idEmployee;
|
||||
/** 社員名 */
|
||||
private String nmEmployee;
|
||||
/** 社員名カナ */
|
||||
private String knEmployee;
|
||||
/** メールアドレス */
|
||||
private String mailAddress;
|
||||
/** パスワード */
|
||||
private String password;
|
||||
/** 役職ID */
|
||||
private String idDepartment;
|
||||
|
||||
/**
|
||||
* @return 社員ID
|
||||
*/
|
||||
public String getIdEmployee() {
|
||||
return idEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param idEmployee 社員ID
|
||||
*/
|
||||
public void setIdEmployee(String idEmployee) {
|
||||
this.idEmployee = idEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 社員名
|
||||
*/
|
||||
public String getNmEmployee() {
|
||||
return nmEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nmEmployee 社員名
|
||||
*/
|
||||
public void setNmEmployee(String nmEmployee) {
|
||||
this.nmEmployee = nmEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 社員名カナ
|
||||
*/
|
||||
public String getKnEmployee() {
|
||||
return knEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param knEmployee 社員名カナ
|
||||
*/
|
||||
public void setKnEmployee(String knEmployee) {
|
||||
this.knEmployee = knEmployee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return メールアドレス
|
||||
*/
|
||||
public String getMailAddress() {
|
||||
return mailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mailAddress メールアドレス
|
||||
*/
|
||||
public void setMailAddress(String mailAddress) {
|
||||
this.mailAddress = mailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return パスワード
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param password パスワード
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 役職ID
|
||||
*/
|
||||
public String getIdDepartment() {
|
||||
return idDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param idDepartment 役職ID
|
||||
*/
|
||||
public void setIdDepartment(String idDepartment) {
|
||||
this.idDepartment = idDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getIdEmployee() + "\t" + getNmEmployee() + "\t" + getKnEmployee() + "\t"
|
||||
+ getMailAddress() + "\t" + getPassword() + "\t" + getIdDepartment();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toCSV() {
|
||||
return getIdEmployee() + "," + getNmEmployee() + "," + getKnEmployee() + ","
|
||||
+ getMailAddress() + "," + getPassword() + "," + getIdDepartment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrimaryKeyValue() {
|
||||
return idEmployee;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user