org.randomcoder.article
Class Article

java.lang.Object
  extended by org.randomcoder.article.Article
All Implemented Interfaces:
Serializable

public class Article
extends Object
implements Serializable

JavaBean representing an article.

 Copyright (c) 2006, 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
Article()
           
 
Method Summary
 List<Comment> getComments()
          Gets the list of comments for this article.
 String getContent()
          Gets the textual content of this article.
 ContentType getContentType()
          Gets the content type for this article.
 User getCreatedByUser()
          Gets the User this article was created by.
 Date getCreationDate()
          Gets the creation date of this article.
 Long getId()
          Gets the id of this article.
 Date getModificationDate()
          Gets the modification date of this article.
 User getModifiedByUser()
          Gets the user who last modified this article.
 String getPermalink()
          Gets the permalink for this article.
 String getPermalinkUrl()
          Builds a context-relative permalink for the selected article.
 String getSummary()
          Gets the summary text for this article.
 List<Tag> getTags()
          Gets the tags associated with this article.
 String getTitle()
          Gets the title of this article.
 void setComments(List<Comment> comments)
          Sets the list of comments for this article.
 void setContent(String content)
          Sets the textual content of this article.
 void setContentType(ContentType contentType)
          Sets the content type of this article.
 void setCreatedByUser(User createdByUser)
          Sets the user this article was created by.
 void setCreationDate(Date creationDate)
          Sets the creation date of this article.
 void setId(Long id)
          Sets the id of this article
 void setModificationDate(Date modificationDate)
          Sets the modification date of this article.
 void setModifiedByUser(User modifiedByUser)
          Sets the user who last modified this article.
 void setPermalink(String permalink)
          Sets the permalink for this article.
 void setSummary(String summary)
          Sets the summary text for this article.
 void setTags(List<Tag> tags)
          Sets the tags associated with this article.
 void setTitle(String title)
          Sets the title of this article.
 String toString()
          Gets a string representation of this object, suitable for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Article

public Article()
Method Detail

getId

public Long getId()
Gets the id of this article.

Returns:
article id

setId

public void setId(Long id)
Sets the id of this article

Parameters:
id - article id

getTags

public List<Tag> getTags()
Gets the tags associated with this article.

Returns:
List of Tag objects

setTags

public void setTags(List<Tag> tags)
Sets the tags associated with this article.

Parameters:
tags - List of Tag objects

getComments

public List<Comment> getComments()
Gets the list of comments for this article.

Returns:
list of comments

setComments

public void setComments(List<Comment> comments)
Sets the list of comments for this article.

Parameters:
comments - list of comments

getContentType

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

Returns:
content type

setContentType

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

Parameters:
contentType - content type

getPermalink

public String getPermalink()
Gets the permalink for this article.

Returns:
permalink

setPermalink

public void setPermalink(String permalink)
Sets the permalink for this article.

Parameters:
permalink - permalink

getCreatedByUser

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

Returns:
user

setCreatedByUser

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

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

getCreationDate

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

Returns:
creation date

setCreationDate

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

Parameters:
creationDate - creation date

getModifiedByUser

public User getModifiedByUser()
Gets the user who last modified this article.

Returns:
user, or null if not modified, or user doesn't exist.

setModifiedByUser

public void setModifiedByUser(User modifiedByUser)
Sets the user who last modified this article.

Parameters:
modifiedByUser - user

getModificationDate

public Date getModificationDate()
Gets the modification date of this article.

Returns:
modification date, or null if article has not been modified

setModificationDate

public void setModificationDate(Date modificationDate)
Sets the modification date of this article.

Parameters:
modificationDate - modification date

getTitle

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

Returns:
article title

setTitle

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

Parameters:
title - article title

getContent

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

Returns:
article content

setContent

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

Parameters:
content - article content

getSummary

public String getSummary()
Gets the summary text for this article.

Returns:
article summyar

setSummary

public void setSummary(String summary)
Sets the summary text for this article.

Parameters:
summary - summary text

getPermalinkUrl

public String getPermalinkUrl()
Builds a context-relative permalink for the selected article.

Returns:
permalink

toString

public String toString()
Gets a string representation of this object, suitable for debugging.

Overrides:
toString in class Object
Returns:
string representation of this object


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