From e01c932413d26a62446c16380d362da821abfaa1 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Thu, 10 Sep 2026 16:08:01 +0900 Subject: [PATCH] =?UTF-8?q?[edit]=20Entity,=20pageproperty=E3=82=92?= =?UTF-8?q?=E7=B7=A8=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/infra/entity/DepartmentEntity.java | 20 +++++++++++++++---- .../TransitionTargetPageNameKeyword.java | 4 ++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/rhizome/app/infra/entity/DepartmentEntity.java b/src/main/java/com/example/rhizome/app/infra/entity/DepartmentEntity.java index fc043e1..9ad3e0c 100644 --- a/src/main/java/com/example/rhizome/app/infra/entity/DepartmentEntity.java +++ b/src/main/java/com/example/rhizome/app/infra/entity/DepartmentEntity.java @@ -7,14 +7,21 @@ package com.example.rhizome.app.infra.entity; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + import com.example.rhizome.app.domain.model.Department; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import javax.persistence.*; -import java.util.List; - /** * Department テーブルの Entity * @@ -39,7 +46,12 @@ public class DepartmentEntity { */ @Column(name = "nm_department", nullable = false) private String nmDepartment; - + + + public static Department createDepartment(DepartmentEntity departmentEntity) { + return new Department(departmentEntity.getIdDepartment(), departmentEntity.getNmDepartment()); + } + /** * DepartmentEntity(DataAccess層依存)から Department(BusinessLogic層依存型)に変換します。 * diff --git a/src/main/java/com/example/rhizome/app/presentation/controller/pageproperty/TransitionTargetPageNameKeyword.java b/src/main/java/com/example/rhizome/app/presentation/controller/pageproperty/TransitionTargetPageNameKeyword.java index eb40923..a0ebfaf 100644 --- a/src/main/java/com/example/rhizome/app/presentation/controller/pageproperty/TransitionTargetPageNameKeyword.java +++ b/src/main/java/com/example/rhizome/app/presentation/controller/pageproperty/TransitionTargetPageNameKeyword.java @@ -50,7 +50,7 @@ public class TransitionTargetPageNameKeyword { public static final String INSERT_DEPARTMENT = "/insertDepartment"; public static final String SHOW_MENU = "/showMenu"; public static final String SELECT_EMPLOYEE_INFO = "/selectEmployeeInfo"; - public static final String SELECT_DEPARTMENT_INFO = "/selectDepartmentInfo"; + public static final String SELECT_DEPARTMENT = "/selectDepartment"; public static final String SELECT_EMPLOYEE_INFO_FORM_EMPTY = "/selectAll"; public static final String SELECT_DEPARTMENT_INFO_FORM_EMPTY = "/selectAllDepartment"; public static final String SHOW_UPDATE_EMPLOYEE = "/showUpdateEmployee"; @@ -85,7 +85,7 @@ public class TransitionTargetPageNameKeyword { INSERT_DEPARTMENT, SHOW_MENU, SELECT_EMPLOYEE_INFO, - SELECT_DEPARTMENT_INFO, + SELECT_DEPARTMENT, SELECT_EMPLOYEE_INFO_FORM_EMPTY, SELECT_DEPARTMENT_INFO_FORM_EMPTY, SHOW_UPDATE_EMPLOYEE,