diff --git a/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java b/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java index 0a87aa6d..5d87f692 100644 --- a/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java +++ b/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java @@ -9,8 +9,6 @@ import java.util.List; * ドキュメントのメタデータ */ public class DocumentMeta { - // TODO-rca: 作成日時なしでインスタンス化できるようにする? - /** * ドキュメントのID(String) */ @@ -36,6 +34,31 @@ public class DocumentMeta { */ List tags; + // Constructor + public DocumentMeta() { + } + + public DocumentMeta(String id, String title, Date updatedAt, Date createdAt, List tags) { // With all + this.id = id; + this.title = title; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.tags = tags; + } + + public DocumentMeta(String id, String title, Date updatedAt, Date createdAt) { // Without tags + this.id = id; + this.title = title; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.tags = new ArrayList<>(); + } + + public DocumentMeta(String id, String title) { // Without tags, updatedAt, createdAt + this.id = id; + this.title = title; + } + // Getter /** @@ -125,4 +148,5 @@ public class DocumentMeta { public void setTags(List tags) { this.tags = tags; } + }