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

View File

@ -1,4 +1,32 @@
package one.nem.lacerta.data.impl; package one.nem.lacerta.data.impl;
public class DocumentDebugImpl { import java.util.List;
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;
public class DocumentDebugImpl implements DocumentDebug{
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";
}
} }