From 0a9054deac098e3fab84d3921878f2fcba89c9e3 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 10:56:55 +0900 Subject: [PATCH] WIP --- .../java/one/nem/lacerta/data/impl/DocumentImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 74bd1f1b..2ef4f121 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 @@ -11,6 +11,8 @@ import one.nem.lacerta.model.document.DocumentDetail; import one.nem.lacerta.source.database.LacertaDatabase; +import one.nem.lacerta.source.database.entity.DocumentEntity; + public class DocumentImpl implements Document{ @@ -37,6 +39,16 @@ public class DocumentImpl implements Document{ @Override public DocumentDetail getDocumentDetail(String id) { DocumentDetail documentDetail = new DocumentDetail(); + DocumentEntity documentEntity = database.documentDao().findById(id); + + // 組み立て処理 + // TODO-rca: 切り出すべきかも? + DocumentMeta documentMeta = new DocumentMeta(); + documentMeta.setId(documentEntity.id); + documentMeta.setTitle(documentEntity.title); + documentMeta.setCreatedAt(documentEntity.createdAt); + documentMeta.setUpdatedAt(documentEntity.updatedAt); + documentMeta.setTags(documentEntity.tagIds); }