From 028a00bde6df79aef98594b8b8b5c07ec7dfcb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 14 Dec 2023 11:28:59 +0900 Subject: [PATCH] =?UTF-8?q?DocumentDetail=E5=8F=96=E5=BE=97=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=AD=E3=82=B8=E3=83=83=E3=82=AF=E6=9B=B8=E3=81=84?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/data/impl/DocumentImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java index 50aa1ada..8f604156 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java @@ -46,7 +46,8 @@ public class DocumentImpl implements Document{ DocumentDetail documentDetail = new DocumentDetail(); DocumentEntity documentEntity = database.documentDao().findById(id); - // タグデータ作成 + // タグ取得 + // TODO-rca: 切り出すべきかも? List tagEntities = database.tagDao().findByIds(documentEntity.tagIds); ArrayList documentTags = new ArrayList<>(); for (TagEntity tagEntity : tagEntities) { @@ -58,7 +59,8 @@ public class DocumentImpl implements Document{ } // パス取得 - LibraryEntity libraryEntity = database.libraryDao().findById(id) + // TODO-rca: 切り出すべきかも? + LibraryEntity libraryEntity = database.libraryDao().findById(id); DocumentPath documentPath = new DocumentPath(libraryEntity.rootPath, libraryEntity.path); // 組み立て処理 @@ -71,9 +73,10 @@ public class DocumentImpl implements Document{ documentMeta.setTags(documentTags); documentDetail.setMeta(documentMeta); documentDetail.setAuthor(documentEntity.author); - documentDetail.setPath(new DocumentPath(documentEntity.defaultBranch)); - + documentDetail.setPath(documentPath); + documentDetail.setDefaultBranch(documentEntity.defaultBranch); + return documentDetail; } @Override