DocumentDebugを削除

This commit is contained in:
r-ca 2024-01-14 17:27:43 +09:00
parent 9245981233
commit e026da96fa
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
3 changed files with 0 additions and 75 deletions

View File

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

View File

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

View File

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