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); } }