This commit is contained in:
ろむねこ 2023-12-14 10:56:55 +09:00
parent 489ed3c4f8
commit 0a9054deac
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -11,6 +11,8 @@ import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.source.database.LacertaDatabase;
import one.nem.lacerta.source.database.entity.DocumentEntity;
public class DocumentImpl implements Document{
@ -37,6 +39,16 @@ public class DocumentImpl implements Document{
@Override
public DocumentDetail getDocumentDetail(String id) {
DocumentDetail documentDetail = new DocumentDetail();
DocumentEntity documentEntity = database.documentDao().findById(id);
// 組み立て処理
// TODO-rca: 切り出すべきかも?
DocumentMeta documentMeta = new DocumentMeta();
documentMeta.setId(documentEntity.id);
documentMeta.setTitle(documentEntity.title);
documentMeta.setCreatedAt(documentEntity.createdAt);
documentMeta.setUpdatedAt(documentEntity.updatedAt);
documentMeta.setTags(documentEntity.tagIds);
}