mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 19:47:36 +00:00
WIP
This commit is contained in:
1 file changed
+29
-1
@@ -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";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user