org.davesag.generica.core
Class Comment
java.lang.Object
org.davesag.generica.core.AbstractDateStamped
org.davesag.generica.core.AbstractContent
org.davesag.generica.core.AbstractExtensibleContent
org.davesag.generica.core.AbstractText
org.davesag.generica.core.Comment
- All Implemented Interfaces:
- Authorable, Content, DateStamped, Extensible, Localisable, Persistable, Serializable
- public class Comment
- extends AbstractText
This Comment bean represents a basic text item suitable as a
base for any content management system where comments should be displayed on
a website. The comments are designed to be localizable.
- Since:
- Generica 1.0
- Version:
- CVS Revision $Id: Comment.java,v 1.13 2004/04/08 13:19:07 davesag Exp $
- Author:
- Dave Sag
http://www.davesag.com
- See Also:
Story,
Media,
Serialized Form
|
Method Summary |
boolean |
equals(Object o)
Tests if the supplied object is equal to this Comment. |
int |
hashcode()
You must override the hashcode if you override the equals method. |
String |
toString()
a short string that identifies tyhe comment. |
Comment
public Comment()
- null constructor required by hibernate.
Comment
public Comment(String title,
User author,
String text,
String lang)
- Constructor that takes a title, author and text.
- Parameters:
title - The title of the Comment.author - The User that wrote the Comment.text - The text of the Comment.lang - The ISO Language Code.
Comment
public Comment(String title,
User author,
String text,
Locale loc)
- Constructor that takes a title, author and text.
- Parameters:
title - The title of the Comment.author - The User that wrote the Comment.text - The text of the Comment.loc - The Locale used to determine the ISO Language Code.
toString
public String toString()
- a short string that identifies tyhe comment.
- Specified by:
toString in class AbstractContent
- Returns:
- the comment title. useful for debugging.
equals
public boolean equals(Object o)
- Tests if the supplied object is equal to this Comment.
- Overrides:
equals in class AbstractText
- Parameters:
o - The object to test against this Comment. Must also be a
Comment to make sense.
- Returns:
- true if the two users have the same id.
hashcode
public int hashcode()
- You must override the hashcode if you override the equals method.
- Specified by:
hashcode in class AbstractContent
- Returns:
- a valid hashcode for this story.
Dave Sag Generica API version 0.5.9 - (prerelease) Copyright © 2003 - 2004 Dave Sag.