|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.unitedfront2.domain.accesscontrol.AbstractResource
org.unitedfront2.domain.communication.Blog
public class Blog
ブログを表すドメインモデルです。
OwnerOnly, ${this.readAccessControl} is ${this.overview.readAccessControl}, ${this.writeAccessControl} is ${this.overview.writeAccessControl}, ブログ記事が存在するブログは削除できない。| フィールドの概要 |
|---|
| クラス org.unitedfront2.domain.accesscontrol.AbstractResource から継承されたフィールド |
|---|
logger |
| コンストラクタの概要 | |
|---|---|
Blog()
|
|
Blog(Integer id,
String code,
Message overview,
Integer ownerId,
AccessControl readAccessControl,
AccessControl writeAccessControl,
AccessControl commeAccessControl)
|
|
Blog(String code,
Message overview,
Integer ownerId,
AccessControl readAccessControl,
AccessControl writeAccessControl,
AccessControl commeAccessControl)
|
|
| メソッドの概要 | |
|---|---|
protected boolean |
buildEqualsBuilder(EqualsBuilder eb,
Object other)
EqualsBuilder にプロパティを設定します。 |
protected void |
buildHashCodeBuilder(HashCodeBuilder hcb)
HashCodeBuilder にプロパティを設定します。 |
protected void |
buildToStringBuilder(ToStringBuilder tsb)
ToStringBuilder にプロパティを設定します。 |
boolean |
canComment()
匿名ユーザに投稿アクセス権限があるか判定します。 |
boolean |
canComment(int userId)
投稿アクセス権限があるか判定します。 |
void |
commentAccess()
匿名ユーザで投稿アクセスを試みます。 |
void |
commentAccess(int userId)
投稿アクセスを試みます。 |
void |
delete()
自身をデータベースから削除します。 |
String |
getCode()
|
AccessControl |
getCommentAccessControl()
|
int |
getCount()
|
List<BlogEntry> |
getEntries()
|
Integer |
getId()
|
Message |
getOverview()
|
Profile |
getOwnerProfile()
|
boolean |
identify(Blog blog)
引数に指定したドメインオブジェクトが、このドメインオブジェクトと同一であるかどうかを判定します。 |
void |
post(BlogEntry blogEntry)
ブログ記事を投稿します。 |
void |
retrieveCount()
ブログ記事総件数を復元します。 |
void |
retrieveEntries()
全てのブログ記事を復元します。 |
void |
retrieveEntries(int no,
int num)
指定した範囲のブログ記事を復元します。 |
void |
setBlogDao(BlogDao blogDao)
|
void |
setCode(String code)
|
void |
setCommentAccessControl(AccessControl commentAccessControl)
|
void |
setId(Integer id)
|
void |
setOverview(Message overview)
|
void |
store()
自身を永続化します。 |
| クラス org.unitedfront2.domain.accesscontrol.AbstractResource から継承されたメソッド |
|---|
canRead, canRead, canRead, canWrite, canWrite, canWrite, equals, getOwner, getOwnerId, getReadAccessControl, getSimpleUserTable, getWriteAccessControl, hashCode, readAccess, readAccess, readAccess, retrieveOwner, setOwner, setOwnerId, setReadAccessControl, setSimpleUserTable, setWriteAccessControl, toString, writeAccess, writeAccess, writeAccess |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Blog()
public Blog(String code,
Message overview,
Integer ownerId,
AccessControl readAccessControl,
AccessControl writeAccessControl,
AccessControl commeAccessControl)
public Blog(Integer id,
String code,
Message overview,
Integer ownerId,
AccessControl readAccessControl,
AccessControl writeAccessControl,
AccessControl commeAccessControl)
| メソッドの詳細 |
|---|
protected boolean buildEqualsBuilder(EqualsBuilder eb,
Object other)
AbstractResource の記述:EqualsBuilder にプロパティを設定します。この実装では、所有者 ID 、参照権限、編集
権限を設定しています。
AbstractResource 内の buildEqualsBuildereb - EqualsBuilderother - 比較対象のオブジェクト
EqualsBuilder の構築途中で AbstractResource.equals(Object) が
false を返すべきと判断できれば false 、そうでなければ
trueprotected void buildHashCodeBuilder(HashCodeBuilder hcb)
AbstractResource の記述:HashCodeBuilder にプロパティを設定します。この実装では、所有者 ID 、参照権限、
編集権限を設定しています。
AbstractResource 内の buildHashCodeBuilderhcb - HashCodeBuilderprotected void buildToStringBuilder(ToStringBuilder tsb)
AbstractResource の記述:ToStringBuilder にプロパティを設定します。この実装では、所有者 ID 、参照権限、
編集権限を設定しています。
AbstractResource 内の buildToStringBuildertsb - ToStringBuilder
public void store()
throws BlogCodeUsedByOtherException
Storable の記述:transient 修飾子が付いていない、全ての
永続プロパティです。主キーが設定されていなければ新規のデータとして登録し、主キーが設定されていれ
ば既存のデータを更新します。永続化の過程で主キーなどが自動生成された場合、自身の対応するプロパ
ティに自動生成された値が設定されます。データに不整合が生じた場合、例外が発生します。
Storable 内の storeBlogCodeUsedByOtherException - 指定したコードが他のブログで既に使用されているpublic boolean identify(Blog blog)
Identifiable の記述:equals メソッドとは異なり、そのドメインオブジェクトを一意に識別できる最小のプ
ロパティを用いて同一性を判別します。特に説明がない限り、比較には主キーとなるプロパティが利用されま
す。このドメインオブジェクト自身または引数に指定したドメインオブジェクトに主キーが設定されていない場
合、false が返されます。一般的な実装例を示します。
public boolean identify(Domain other) {
if (id == null) {
return false;
}
return id.equals(other.getId());
}
Identifiable<Blog> 内の identifyblog - ドメインオブジェクト
true 、そうでなければ false
public void retrieveEntries(int no,
int num)
no - 開始点となる記事番号num - 件数public void retrieveEntries()
public void retrieveCount()
public void post(BlogEntry blogEntry)
blogEntry - ブログ記事
public void commentAccess()
throws AccessDeniedException
AccessDeniedException - アクセス拒否
public void commentAccess(int userId)
throws AccessDeniedException
userId - ユーザ ID
AccessDeniedException - アクセス拒否public boolean canComment()
true 、なければ falsepublic boolean canComment(int userId)
userId - ユーザ ID
true 、なければ false
public void delete()
throws BlogEntryExistException
Deletable の記述:
Deletable 内の deleteBlogEntryExistException - ブログ記事が存在しているpublic Integer getId()
public void setId(Integer id)
public String getCode()
public void setCode(String code)
public Message getOverview()
public void setOverview(Message overview)
public AccessControl getCommentAccessControl()
public void setCommentAccessControl(AccessControl commentAccessControl)
public List<BlogEntry> getEntries()
public int getCount()
public Profile getOwnerProfile()
public void setBlogDao(BlogDao blogDao)
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||