2 Commits

Author SHA1 Message Date
a7162f1b2e Revert "no message"
This reverts commit e4cf7bed2e.
2026-10-23 09:24:52 +09:00
e4cf7bed2e no message 2026-10-22 17:09:26 +09:00
8 changed files with 6 additions and 125 deletions

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="実行例/em_oop.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

1
.gitignore vendored
View File

@@ -1 +0,0 @@
/bin/

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>development-empmanager</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@@ -1 +0,0 @@
org.eclipse.wst.jsdt.launching.JRE_CONTAINER

View File

@@ -1 +0,0 @@
Global

View File

@@ -16,34 +16,6 @@ public class EmployeeAccess extends BaseAccess {
super(EMPDATA_FILEPATH);
}
public List<BaseData> allSelect() throws FileNotFoundException {
//全件データ
List<BaseData> allList = new ArrayList<>();
//取得用リスト(CSV形式)
List<String> csvList = readData();
//CSVデータを1行で出力
for (String line : csvList) {
//インスタンス生成
EmployeeData employee = new EmployeeData();
//,=空白、[5]まで行ったら終了
String[] columns = line.split(",");
employee.setIdEmployee(columns[0]);
employee.setNmEmployee(columns[1]);
employee.setKnEmployee(columns[2]);
employee.setMailAddress(columns[3]);
employee.setPassword(columns[4]);
employee.setIdDepartment(columns[5]);
allList.add(employee);
}
return allList;
}
@Override
public List<BaseData> selectById(String key) throws FileNotFoundException {
//全件データ

View File

@@ -41,7 +41,7 @@ public class Main {
switch (ope) {
case "1": //検索
empSel();
empSelect();
break;
case "2": //登録
empInsert();
@@ -61,57 +61,6 @@ public class Main {
}
}
/**
* 検索方法を選択する
* @Override
* @throws FileNotFoundException
*/
public void empSel() throws FileNotFoundException {
//検索方法の選択
System.out.println("1:全検索 2:条件検索 それ以外:戻る");
String sel = sc.nextLine();
switch (sel) {
case "1": //全検索
empList();
break;
case "2": //条件検索
empSelect();
break;
default: //それ以外:戻る
break;
}
}
/**
* 全検索で一覧を表示する
*
* @throws FileNotFoundException
*/
public void empList() throws FileNotFoundException {
List<BaseData> allList;
//一覧データ取得
EmployeeAccess all = new EmployeeAccess();
allList = all.allSelect();
if (allList.size() == 0) { //取得結果が0件の場合
System.out.println("入力された値で情報がみつかりませんでした");
}
//for文を10回繰り返す
for(int) {
System.out.println(employee.toString());
}
//取得結果件数分、データをタブ区切りで出力する
/*for (BaseData employee : allList) {
System.out.println(employee.toString());
}*/
System.out.println(allList);
}
/**
* 社員ファイルから情報を検索する
*