diff --git a/data/src/main/java/one/nem/lacerta/data/DocumentDebug.java b/data/src/main/java/one/nem/lacerta/data/DocumentDebug.java deleted file mode 100644 index 94ae5b42..00000000 --- a/data/src/main/java/one/nem/lacerta/data/DocumentDebug.java +++ /dev/null @@ -1,12 +0,0 @@ -package one.nem.lacerta.data; - -import one.nem.lacerta.model.document.DocumentMeta; -import one.nem.lacerta.model.document.DocumentDetail; -import one.nem.lacerta.model.document.path.DocumentPath; -import one.nem.lacerta.model.document.tag.DocumentTag; - -public interface DocumentDebug { - - void insertDocument(DocumentMeta meta, DocumentDetail detail); - -} 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 deleted file mode 100644 index 0985436f..00000000 --- a/data/src/main/java/one/nem/lacerta/data/impl/DocumentDebugImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -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; - -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; - - @Inject - public DocumentDebugImpl() { - } - - - 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"; - - database.documentDao().insert(documentEntity); - database.libraryDao().insert(libraryEntity); - } -} diff --git a/data/src/main/java/one/nem/lacerta/data/module/DocumentDebugModule.java b/data/src/main/java/one/nem/lacerta/data/module/DocumentDebugModule.java deleted file mode 100644 index bcf5c7c5..00000000 --- a/data/src/main/java/one/nem/lacerta/data/module/DocumentDebugModule.java +++ /dev/null @@ -1,16 +0,0 @@ -package one.nem.lacerta.data.module; - -import dagger.Binds; -import dagger.Module; -import dagger.hilt.InstallIn; -import dagger.hilt.components.SingletonComponent; -import one.nem.lacerta.data.DocumentDebug; -import one.nem.lacerta.data.impl.DocumentDebugImpl; - -@Module -@InstallIn(SingletonComponent.class) // TODO-rca: Singletonでいいのか検討する -abstract public class DocumentDebugModule { - - @Binds - public abstract DocumentDebug bindDocumentDebug(DocumentDebugImpl documentDebugImpl); -}