mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
コンストラクタの種類を追加
This commit is contained in:
parent
c297fb043a
commit
c875ba5e54
|
@ -9,8 +9,6 @@ import java.util.List;
|
|||
* ドキュメントのメタデータ
|
||||
*/
|
||||
public class DocumentMeta {
|
||||
// TODO-rca: 作成日時なしでインスタンス化できるようにする?
|
||||
|
||||
/**
|
||||
* ドキュメントのID(String)
|
||||
*/
|
||||
|
@ -36,6 +34,31 @@ public class DocumentMeta {
|
|||
*/
|
||||
List<DocumentTag> tags;
|
||||
|
||||
// Constructor
|
||||
public DocumentMeta() {
|
||||
}
|
||||
|
||||
public DocumentMeta(String id, String title, Date updatedAt, Date createdAt, List<DocumentTag> 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<DocumentTag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user