com.randomcoder.article.comment
Class Comment

java.lang.Object
  extended by com.randomcoder.article.comment.Comment
All Implemented Interfaces:
Serializable

public class Comment
extends Object
implements Serializable

JavaBean representing an article comment.

 Copyright (c) 2006-2007, Craig Condit. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
 
   * Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
     
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 

See Also:
Serialized Form

Constructor Summary
Comment()
           
 
Method Summary
 String getAnonymousEmailAddress()
          Gets the email address for anonymous users.
 String getAnonymousUserName()
          Gets the user name to display for anonymous users.
 String getAnonymousWebsite()
          Gets the web site for anonymous users.
 Article getArticle()
          Gets the article this comment belongs to.
 String getContent()
          Gets the textual content of this comment.
 ContentType getContentType()
          Gets the content type for this comment.
 User getCreatedByUser()
          Gets the User this comment was created by.
 Date getCreationDate()
          Gets the creation date of this comment.
 Long getId()
          Gets the ID for this comment.
 CommentIp getIpAddress()
          Gets the IP address of the user who posted this comment.
 ModerationStatus getModerationStatus()
          Gets the moderation status of this comment.
 CommentReferrer getReferrer()
          Gets the HTTP referrer sent when this comment was posted.
 String getTitle()
          Gets the title of this comment.
 CommentUserAgent getUserAgent()
          Gets the HTTP user agent of the user who posted this comment.
 boolean isVisible()
          Determines if this comment is visible.
 void setAnonymousEmailAddress(String anonymousEmailAddress)
          Sets the email address for anonymous users.
 void setAnonymousUserName(String anonymousUserName)
          Sets the user name to display for anonymous users.
 void setAnonymousWebsite(String anonymousWebsite)
          Sets the web site for anonymous users.
 void setArticle(Article article)
          Sets the article this comment belongs to.
 void setContent(String content)
          Sets the textual content of this comment.
 void setContentType(ContentType contentType)
          Sets the content type of this comment.
 void setCreatedByUser(User createdByUser)
          Sets the user this comment was created by.
 void setCreationDate(Date creationDate)
          Sets the creation date of this comment.
 void setId(Long id)
          Sets the ID for this comment.
 void setIpAddress(CommentIp ipAddress)
          Sets the IP address of the user who posted this comment.
 void setModerationStatus(ModerationStatus moderationStatus)
          Sets the moderation status of this comment.
 void setReferrer(CommentReferrer referrer)
          Sets the HTTP referrer sent when this comment was posted.
 void setTitle(String title)
          Sets the title of this comment.
 void setUserAgent(CommentUserAgent userAgent)
          Sets the HTTP user agent of the user who posted this comment.
 void setVisible(boolean visible)
          Marks this comment as visible or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment()
Method Detail

getId

public Long getId()
Gets the ID for this comment.

Returns:
id

setId

public void setId(Long id)
Sets the ID for this comment.

Parameters:
id - id

getArticle

public Article getArticle()
Gets the article this comment belongs to.

Returns:
article

setArticle

public void setArticle(Article article)
Sets the article this comment belongs to.

Parameters:
article - article

getContentType

public ContentType getContentType()
Gets the content type for this comment.

Returns:
content type

setContentType

public void setContentType(ContentType contentType)
Sets the content type of this comment.

Parameters:
contentType - content type

getCreatedByUser

public User getCreatedByUser()
Gets the User this comment was created by.

Returns:
user

setCreatedByUser

public void setCreatedByUser(User createdByUser)
Sets the user this comment was created by.

Parameters:
createdByUser - user, or null if user no longer exists.

getCreationDate

public Date getCreationDate()
Gets the creation date of this comment.

Returns:
creation date

setCreationDate

public void setCreationDate(Date creationDate)
Sets the creation date of this comment.

Parameters:
creationDate - creation date

getAnonymousUserName

public String getAnonymousUserName()
Gets the user name to display for anonymous users.

Returns:
anonymous user name

setAnonymousUserName

public void setAnonymousUserName(String anonymousUserName)
Sets the user name to display for anonymous users.

Parameters:
anonymousUserName - anonymous user name

getAnonymousEmailAddress

public String getAnonymousEmailAddress()
Gets the email address for anonymous users.

Returns:
anonymous email address

setAnonymousEmailAddress

public void setAnonymousEmailAddress(String anonymousEmailAddress)
Sets the email address for anonymous users.

Parameters:
anonymousEmailAddress - anonymous email address

getAnonymousWebsite

public String getAnonymousWebsite()
Gets the web site for anonymous users.

Returns:
anonymous web site

setAnonymousWebsite

public void setAnonymousWebsite(String anonymousWebsite)
Sets the web site for anonymous users.

Parameters:
anonymousWebsite - anonymous web site

getTitle

public String getTitle()
Gets the title of this comment.

Returns:
comment title

setTitle

public void setTitle(String title)
Sets the title of this comment.

Parameters:
title - comment title

getContent

public String getContent()
Gets the textual content of this comment.

Returns:
comment content

setContent

public void setContent(String content)
Sets the textual content of this comment.

Parameters:
content - comment content

isVisible

public boolean isVisible()
Determines if this comment is visible.

Returns:
true if visible, false otherwise

setVisible

public void setVisible(boolean visible)
Marks this comment as visible or not.

Parameters:
visible - true if visible, false otherwise

getModerationStatus

public ModerationStatus getModerationStatus()
Gets the moderation status of this comment.

Returns:
moderation status

setModerationStatus

public void setModerationStatus(ModerationStatus moderationStatus)
Sets the moderation status of this comment.

Parameters:
moderationStatus - moderation status

getReferrer

public CommentReferrer getReferrer()
Gets the HTTP referrer sent when this comment was posted.

Returns:
HTTP referrer

setReferrer

public void setReferrer(CommentReferrer referrer)
Sets the HTTP referrer sent when this comment was posted.

Parameters:
referrer - HTTP referrer

getIpAddress

public CommentIp getIpAddress()
Gets the IP address of the user who posted this comment.

Returns:
IP address

setIpAddress

public void setIpAddress(CommentIp ipAddress)
Sets the IP address of the user who posted this comment.

Parameters:
ipAddress - IP address

getUserAgent

public CommentUserAgent getUserAgent()
Gets the HTTP user agent of the user who posted this comment.

Returns:
HTTP user agent

setUserAgent

public void setUserAgent(CommentUserAgent userAgent)
Sets the HTTP user agent of the user who posted this comment.

Parameters:
userAgent - HTTP user agent


Copyright © 2006-2008 Craig Condit. All Rights Reserved.