This commit is contained in:
ろむねこ 2023-12-14 11:54:43 +09:00
parent b2410b2625
commit 423993b53e
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -2,6 +2,8 @@ package one.nem.lacerta.data.impl;
import java.util.List; import java.util.List;
import javax.inject.Inject;
import one.nem.lacerta.data.DocumentDebug; import one.nem.lacerta.data.DocumentDebug;
import one.nem.lacerta.model.document.DocumentDetail; import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.DocumentMeta; 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.LibraryEntity;
import one.nem.lacerta.source.database.entity.TagEntity; import one.nem.lacerta.source.database.entity.TagEntity;
import one.nem.lacerta.source.database.LacertaDatabase;
public class DocumentDebugImpl implements DocumentDebug{ public class DocumentDebugImpl implements DocumentDebug{
@Inject
LacertaDatabase database;
public void insertDocument(DocumentMeta meta, DocumentDetail detail) { public void insertDocument(DocumentMeta meta, DocumentDetail detail) {
DocumentEntity documentEntity = new DocumentEntity(); DocumentEntity documentEntity = new DocumentEntity();
LibraryEntity libraryEntity = new LibraryEntity(); LibraryEntity libraryEntity = new LibraryEntity();
@ -28,5 +37,7 @@ public class DocumentDebugImpl implements DocumentDebug{
libraryEntity.path = "Placeholder"; libraryEntity.path = "Placeholder";
libraryEntity.rootPath = "Placeholder"; libraryEntity.rootPath = "Placeholder";
database.documentDao().insert(documentEntity);
database.libraryDao().insert(libraryEntity);
} }
} }