From b2410b26252852d99c57b273c8a727ea024c93dd 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:54:05 +0900 Subject: [PATCH] WIP --- .../lacerta/data/impl/DocumentDebugImpl.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/DocumentDebugImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/DocumentDebugImpl.java index fc57d5fc..a90f9aac 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/DocumentDebugImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/DocumentDebugImpl.java @@ -1,4 +1,32 @@ package one.nem.lacerta.data.impl; -public class DocumentDebugImpl { +import java.util.List; + +import one.nem.lacerta.data.DocumentDebug; +import one.nem.lacerta.model.document.DocumentDetail; +import one.nem.lacerta.model.document.DocumentMeta; + +import one.nem.lacerta.source.database.entity.DocumentEntity; +import one.nem.lacerta.source.database.entity.LibraryEntity; +import one.nem.lacerta.source.database.entity.TagEntity; + +public class DocumentDebugImpl implements DocumentDebug{ + public void insertDocument(DocumentMeta meta, DocumentDetail detail) { + DocumentEntity documentEntity = new DocumentEntity(); + LibraryEntity libraryEntity = new LibraryEntity(); + + documentEntity.id = meta.getId(); + documentEntity.title = meta.getTitle(); + documentEntity.createdAt = meta.getCreatedAt(); + documentEntity.updatedAt = meta.getUpdatedAt(); + documentEntity.author = detail.getAuthor(); + documentEntity.defaultBranch = detail.getDefaultBranch(); + // ArrayListからListに変換 + documentEntity.tagIds = meta.getTagIds(); + + libraryEntity.id = meta.getId(); + libraryEntity.path = "Placeholder"; + libraryEntity.rootPath = "Placeholder"; + + } }