org.unitedfront2.domain.communication
クラス BlogEntry

java.lang.Object
  上位を拡張 org.unitedfront2.domain.communication.BlogEntry
すべての実装されたインタフェース:
Serializable, Deletable, Domain, Identifiable<BlogEntry>, Storable

public class BlogEntry
extends Object
implements Serializable, Identifiable<BlogEntry>, Storable, Deletable, Domain

ブログの記事を表すドメインクラスです。

作成者:
kurokkie
関連項目:
直列化された形式

フィールドの概要
protected  Log logger
          ログ
 
コンストラクタの概要
BlogEntry()
           
BlogEntry(Message entry)
           
 
メソッドの概要
 boolean canReadAccess()
           
 boolean canReadAccess(int userId)
           
 boolean canWriteAccess()
           
 boolean canWriteAccess(int userId)
           
 void delete()
          記事とコメントを全て削除します。
 boolean equals(Object other)
           
 Comment findComment(int id)
          コメントを取得します。
 User getAuthor()
           
 Integer getAuthorId()
           
 String getCode()
           
 int getCommentCount()
           
 List<Comment> getComments()
           
 Message getEntry()
           
 Integer getId()
           
 Date getLastUpdateDate()
           
 User getOwner()
           
 Integer getOwnerId()
           
 AccessControl getReadAccessControl()
           
 Date getRegistrationDate()
           
 MessageEntry getRequiredEntry()
           
 AccessControl getWriteAccessControl()
           
 int hashCode()
           
 boolean identify(BlogEntry other)
          引数に指定したドメインオブジェクトが、このドメインオブジェクトと同一であるかどうかを判定します。
 void post(Comment comment)
          コメントを投稿します。
 void readAccess()
           
 void readAccess(int userId)
           
 void retrieveAuthor()
           
 void retrieveCommentCount()
          このブログ記事のコメント数を復元します。
 void retrieveCommenterProfiles()
          ブログコメントの投稿者のプロフィールを復元します。
 void retrieveCommenters()
          ブログコメントの投稿者を復元します。
 void retrieveComments()
          このブログ記事のブログコメントを復元します。
 void retrieveOwner()
           
 void setBlogDao(BlogDao blogDao)
           
 void setEntry(Message entry)
           
 void store()
          記事の新規投稿は Blog.post(BlogEntry) を利用してください。
 String toString()
           
 void writeAccess()
           
 void writeAccess(int userId)
           
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

logger

protected final transient Log logger
ログ

コンストラクタの詳細

BlogEntry

public BlogEntry()

BlogEntry

public BlogEntry(Message entry)
メソッドの詳細

equals

public boolean equals(Object other)
オーバーライド:
クラス Object 内の equals

hashCode

public int hashCode()
オーバーライド:
クラス Object 内の hashCode

toString

public String toString()
オーバーライド:
クラス Object 内の toString

identify

public boolean identify(BlogEntry other)
インタフェース Identifiable の記述:
引数に指定したドメインオブジェクトが、このドメインオブジェクトと同一であるかどうかを判定します。このメソッ ドは、equals メソッドとは異なり、そのドメインオブジェクトを一意に識別できる最小のプ ロパティを用いて同一性を判別します。特に説明がない限り、比較には主キーとなるプロパティが利用されま す。このドメインオブジェクト自身または引数に指定したドメインオブジェクトに主キーが設定されていない場 合、false が返されます。

一般的な実装例を示します。

 public boolean identify(Domain other) {
     if (id == null) {
         return false;
     }
     return id.equals(other.getId());
 }
 

定義:
インタフェース Identifiable<BlogEntry> 内の identify
パラメータ:
other - ドメインオブジェクト
戻り値:
同一であれば true 、そうでなければ false

store

public void store()
記事の新規投稿は Blog.post(BlogEntry) を利用してください。

定義:
インタフェース Storable 内の store

delete

public void delete()
記事とコメントを全て削除します。

定義:
インタフェース Deletable 内の delete

canReadAccess

public boolean canReadAccess()

canReadAccess

public boolean canReadAccess(int userId)

canWriteAccess

public boolean canWriteAccess()

canWriteAccess

public boolean canWriteAccess(int userId)

getAuthor

public User getAuthor()

getAuthorId

public Integer getAuthorId()

getCode

public String getCode()

getId

public Integer getId()

getRegistrationDate

public Date getRegistrationDate()

getLastUpdateDate

public Date getLastUpdateDate()

getOwner

public User getOwner()

getOwnerId

public Integer getOwnerId()

getReadAccessControl

public AccessControl getReadAccessControl()

getRequiredEntry

public MessageEntry getRequiredEntry()

getWriteAccessControl

public AccessControl getWriteAccessControl()

readAccess

public void readAccess()
                throws AccessDeniedException
例外:
AccessDeniedException

readAccess

public void readAccess(int userId)
                throws AccessDeniedException
例外:
AccessDeniedException

retrieveAuthor

public void retrieveAuthor()

retrieveOwner

public void retrieveOwner()

writeAccess

public void writeAccess()
                 throws AccessDeniedException
例外:
AccessDeniedException

writeAccess

public void writeAccess(int userId)
                 throws AccessDeniedException
例外:
AccessDeniedException

retrieveComments

public void retrieveComments()
このブログ記事のブログコメントを復元します。


retrieveCommenters

public void retrieveCommenters()
ブログコメントの投稿者を復元します。ブログコメントが復元されていない場合は復元します。


retrieveCommenterProfiles

public void retrieveCommenterProfiles()
ブログコメントの投稿者のプロフィールを復元します。ブログコメントや投稿者が復元されていない場合は復元 します。


retrieveCommentCount

public void retrieveCommentCount()
このブログ記事のコメント数を復元します。


post

public void post(Comment comment)
コメントを投稿します。コメントを保存し、このブログ記事と関連付けます。

パラメータ:
comment - コメント

findComment

public Comment findComment(int id)
コメントを取得します。コメントが復元されていなければ復元します。

パラメータ:
id - コメント ID
戻り値:
コメント、見つからなければ null

getEntry

public Message getEntry()

setEntry

public void setEntry(Message entry)

getComments

public List<Comment> getComments()

getCommentCount

public int getCommentCount()

setBlogDao

public void setBlogDao(BlogDao blogDao)


Copyright © 2007-2008 www.unitedfront2.org. All Rights Reserved.