From 423993b53ee190ce4b079874428583d861cfe9e3 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:43 +0900 Subject: [PATCH] WIP --- .../one/nem/lacerta/data/impl/DocumentDebugImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 a90f9aac..3d99bf5f 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 @@ -2,6 +2,8 @@ package one.nem.lacerta.data.impl; import java.util.List; +import javax.inject.Inject; + import one.nem.lacerta.data.DocumentDebug; import one.nem.lacerta.model.document.DocumentDetail; import one.nem.lacerta.model.document.DocumentMeta; @@ -10,7 +12,14 @@ import one.nem.lacerta.source.database.entity.DocumentEntity; import one.nem.lacerta.source.database.entity.LibraryEntity; import one.nem.lacerta.source.database.entity.TagEntity; +import one.nem.lacerta.source.database.LacertaDatabase; + public class DocumentDebugImpl implements DocumentDebug{ + + @Inject + LacertaDatabase database; + + public void insertDocument(DocumentMeta meta, DocumentDetail detail) { DocumentEntity documentEntity = new DocumentEntity(); LibraryEntity libraryEntity = new LibraryEntity(); @@ -28,5 +37,7 @@ public class DocumentDebugImpl implements DocumentDebug{ libraryEntity.path = "Placeholder"; libraryEntity.rootPath = "Placeholder"; + database.documentDao().insert(documentEntity); + database.libraryDao().insert(libraryEntity); } }