DocumentMetaにフラグを追加, コンストラクタ, Getter/Setter追加

This commit is contained in:
r-ca 2024-01-27 17:20:02 +09:00
parent 98b141f96f
commit 45e6b9ab05
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -36,6 +36,10 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応
String author;
boolean isCombineChild;
boolean isCombineParent;
// Constructor
public DocumentMeta() {
@ -48,6 +52,8 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応
this.parentId = null;
this.updatedAt = new Date();
this.createdAt = new Date();
this.isCombineChild = false;
this.isCombineParent = false;
}
public DocumentMeta(String title, String author) {
@ -73,6 +79,17 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応
this.author = author;
}
public DocumentMeta(String id, String title, Date updatedAt, Date createdAt, String parentId, String author, boolean isCombineChild, boolean isCombineParent) {
this.id = id;
this.title = title;
this.updatedAt = updatedAt;
this.createdAt = createdAt;
this.parentId = parentId;
this.author = author;
this.isCombineChild = isCombineChild;
this.isCombineParent = isCombineParent;
}
// Getter
/**
@ -117,6 +134,20 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応
return author;
}
/**
* ドキュメントの結合子フラグ(boolean)を取得する
*/
public boolean getIsCombineChild() {
return isCombineChild;
}
/**
* ドキュメントの結合親フラグ(boolean)を取得する
*/
public boolean getIsCombineParent() {
return isCombineParent;
}
// Setter
/**
@ -167,6 +198,22 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応
this.author = author;
}
/**
* ドキュメントの結合子フラグ(boolean)を設定する
* @param isCombineChild ドキュメントの結合子フラグ
*/
public void setIsCombineChild(boolean isCombineChild) {
this.isCombineChild = isCombineChild;
}
/**
* ドキュメントの結合親フラグ(boolean)を設定する
* @param isCombineParent ドキュメントの結合親フラグ
*/
public void setIsCombineParent(boolean isCombineParent) {
this.isCombineParent = isCombineParent;
}
/**
* updatedAtを現在時刻に設定する
*/