Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.blojsom.blog.database
Class DatabaseComment

    java.lang.Object
      org.blojsom.blog.database.DatabaseComment

All Implemented Interfaces:
  Comment, Response, java.io.Serializable

public class DatabaseComment
extends java.lang.Object
implements Comment, java.io.Serializable

DatabaseComment

Since:
  blojsom 3.0
Version:
  $Id: DatabaseComment.java,v 1.4 2006/04/27 01:53:05 czarneckid Exp $
Author:
  David Czarnecki
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `_author`
`protected java.lang.String` | `_authorEmail`
`protected java.lang.String` | `_authorURL`
`protected java.lang.Integer` | `_blogEntryId`
`protected java.lang.String` | `_blogId`
`protected java.lang.String` | `_comment`
`protected java.util.Date` | `_commentDate`
`protected Entry` | `_entry`
`protected java.lang.Integer` | `_id`
`protected java.lang.String` | `_ip`
`protected java.util.Map` | `_metaData`
`protected java.lang.Integer` | `_parentId`
`protected java.lang.String` | `_status`

Fields inherited from interface org.blojsom.blog.Response
`COMMENT_TYPE, PINGBACK_TYPE, TRACKBACK_TYPE`

Constructor Summary
`DatabaseComment()` Create a new instance of the database comment

Method Summary
`java.lang.String` | `getAuthor()` Get the author of the comment
`java.lang.String` | `getAuthorEmail()` Get the e-mail of the author of the comment
`java.lang.String` | `getAuthorURL()` Get the URL of the author
`java.lang.Integer` | `getBlogEntryId()` Get the blog entry ID
`java.lang.String` | `getBlogId()` Get the blog ID
`java.lang.String` | `getComment()` Get the comment
`java.util.Date` | `getCommentDate()` Get the date the comment was entered
`java.util.Date` | `getDate()` Retrieve the date for this object
`java.lang.String` | `getDateAsFormat(java.lang.String format)` Return the comment date formatted with a specified date format
`java.lang.String` | `getDateAsFormat(java.lang.String format, java.util.Locale locale)` Return the comment date formatted with a specified date format
`Entry` | `getEntry()` Get the `Entry`
`java.lang.String` | `getEscapedComment()` Get the comment as a escaped string
`java.lang.Integer` | `getId()` Get the id of this blog comment
`java.lang.String` | `getIp()` Get the IP
`java.lang.String` | `getISO8601Date()` Return an ISO 8601 style date http://www.w3.org/TR/NOTE-datetime
`java.util.Map` | `getMetaData()` Get the trackback meta-data
`java.lang.Integer` | `getParentId()` Get the comment parent ID
`java.lang.String` | `getRFC822Date()` Return an RFC 822 style date
`java.lang.String` | `getStatus()` Get the status
`java.lang.String` | `getType()` Get the response type
`void` | `setAuthor(java.lang.String author)` Set the author of the comment
`void` | `setAuthorEmail(java.lang.String authorEmail)` Set the e-mail of the author of the comment
`void` | `setAuthorURL(java.lang.String authorURL)` Set the URL for the author
`void` | `setBlogEntryId(java.lang.Integer blogEntryId)` Set the blog entry ID
`void` | `setBlogId(java.lang.String blogId)` Set the blog ID
`void` | `setComment(java.lang.String comment)` Set the new comment
`void` | `setCommentDate(java.util.Date commentDate)` Set the date for the comment
`void` | `setEntry(Entry entry)` Set the `Entry`
`void` | `setId(java.lang.Integer id)` Set the id of this blog comment.
`void` | `setIp(java.lang.String ip)` Set the IP
`void` | `setMetaData(java.util.Map metaData)` Set the trackback meta-data
`void` | `setParentId(java.lang.Integer parentId)` Set the comment parent ID
`void` | `setStatus(java.lang.String status)` Set the status

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _id

    protected java.lang.Integer _id

### _blogId

    protected java.lang.String _blogId

### _blogEntryId

    protected java.lang.Integer _blogEntryId

### _entry

    protected Entry _entry

### _author

    protected java.lang.String _author

### _authorEmail

    protected java.lang.String _authorEmail

### _authorURL

    protected java.lang.String _authorURL

### _comment

    protected java.lang.String _comment

### _commentDate

    protected java.util.Date _commentDate

### _metaData

    protected java.util.Map _metaData

### _parentId

    protected java.lang.Integer _parentId

### _status

    protected java.lang.String _status

### _ip

    protected java.lang.String _ip

Constructor Detail

### DatabaseComment

    public DatabaseComment()

  Create a new instance of the database comment

Method Detail

### getId

    public java.lang.Integer getId()

  Get the id of this blog comment

  Specified by:
    `getId` in interface `Comment`
  Returns:
    Id

### setId

    public void setId(java.lang.Integer id)

  Set the id of this blog comment. This method can only be called if the id has not been set.

  Specified by:
    `setId` in interface `Comment`
  Parameters:
    `id` - New id

### setBlogId

    public void setBlogId(java.lang.String blogId)

  Set the blog ID

  Specified by:
    `setBlogId` in interface `Comment`
  Parameters:
    `blogId` - Blog ID

### getBlogId

    public java.lang.String getBlogId()

  Get the blog ID

  Specified by:
    `getBlogId` in interface `Comment`
  Returns:
    Blog ID

### getBlogEntryId

    public java.lang.Integer getBlogEntryId()

  Get the blog entry ID

  Specified by:
    `getBlogEntryId` in interface `Comment`
  Returns:
    Blog entry ID

### setBlogEntryId

    public void setBlogEntryId(java.lang.Integer blogEntryId)

  Set the blog entry ID

  Specified by:
    `setBlogEntryId` in interface `Comment`
  Parameters:
    `blogEntryId` - Blog entry ID

### getEntry

    public Entry getEntry()

  Get the `Entry`

  Specified by:
    `getEntry` in interface `Comment`
  Returns:
    `Entry`

### setEntry

    public void setEntry(Entry entry)

  Set the `Entry`

  Specified by:
    `setEntry` in interface `Comment`
  Parameters:
    `entry` - `Entry`

### getAuthor

    public java.lang.String getAuthor()

  Get the author of the comment

  Specified by:
    `getAuthor` in interface `Comment`
  Returns:
    Comment author

### setAuthor

    public void setAuthor(java.lang.String author)

  Set the author of the comment

  Specified by:
    `setAuthor` in interface `Comment`
  Parameters:
    `author` - Comment's new author

### getAuthorEmail

    public java.lang.String getAuthorEmail()

  Get the e-mail of the author of the comment

  Specified by:
    `getAuthorEmail` in interface `Comment`
  Returns:
    Author's e-mail

### setAuthorEmail

    public void setAuthorEmail(java.lang.String authorEmail)

  Set the e-mail of the author of the comment

  Specified by:
    `setAuthorEmail` in interface `Comment`
  Parameters:
    `authorEmail` - Author's new e-mail

### getAuthorURL

    public java.lang.String getAuthorURL()

  Get the URL of the author

  Specified by:
    `getAuthorURL` in interface `Comment`
  Returns:
    Author's URL

### setAuthorURL

    public void setAuthorURL(java.lang.String authorURL)

  Set the URL for the author

  Specified by:
    `setAuthorURL` in interface `Comment`
  Parameters:
    `authorURL` - New URL for the author

### getEscapedComment

    public java.lang.String getEscapedComment()

  Get the comment as a escaped string

  Specified by:
    `getEscapedComment` in interface `Comment`
  Returns:
    Escaped Comment

### getComment

    public java.lang.String getComment()

  Get the comment

  Specified by:
    `getComment` in interface `Comment`
  Returns:
    Comment

### setComment

    public void setComment(java.lang.String comment)

  Set the new comment

  Specified by:
    `setComment` in interface `Comment`
  Parameters:
    `comment` - New comment

### getCommentDate

    public java.util.Date getCommentDate()

  Get the date the comment was entered

  Specified by:
    `getCommentDate` in interface `Comment`
  Returns:
    Comment date

### getISO8601Date

    public java.lang.String getISO8601Date()

  Return an ISO 8601 style date http://www.w3.org/TR/NOTE-datetime

  Specified by:
    `getISO8601Date` in interface `Comment`
  Returns:
    Date formatted in ISO 8601 format

### getRFC822Date

    public java.lang.String getRFC822Date()

  Return an RFC 822 style date

  Specified by:
    `getRFC822Date` in interface `Comment`
  Returns:
    Date formatted in RFC 822 format

### getMetaData

    public java.util.Map getMetaData()

  Get the trackback meta-data

  Specified by:
    `getMetaData` in interface `Comment`
  Returns:
    Meta-data as a `Map`

### setCommentDate

    public void setCommentDate(java.util.Date commentDate)

  Set the date for the comment

  Specified by:
    `setCommentDate` in interface `Comment`
  Parameters:
    `commentDate` - Comment date

### setMetaData

    public void setMetaData(java.util.Map metaData)

  Set the trackback meta-data

  Specified by:
    `setMetaData` in interface `Comment`
  Parameters:
    `metaData` - `Map` containing meta-data for this comment

### getDateAsFormat

    public java.lang.String getDateAsFormat(java.lang.String format)

  Return the comment date formatted with a specified date format

  Specified by:
    `getDateAsFormat` in interface `Comment`
  Parameters:
    `format` - Date format
  Returns:
    `null` if the comment date or format is null, otherwise returns the comment date formatted to the specified format. If the format is invalid, returns `commentDate.toString()`

### getDateAsFormat

    public java.lang.String getDateAsFormat(java.lang.String format,
                                            java.util.Locale locale)

  Return the comment date formatted with a specified date format

  Specified by:
    `getDateAsFormat` in interface `Comment`
  Parameters:
    `format` - Date format
    `locale` - Locale for date formatting
  Returns:
    `null` if the entry date or format is null, otherwise returns the entry date formatted to the specified format. If the format is invalid, returns `commentDate.toString()`

### getParentId

    public java.lang.Integer getParentId()

  Get the comment parent ID

  Specified by:
    `getParentId` in interface `Comment`
  Returns:
    Comment parent ID

### setParentId

    public void setParentId(java.lang.Integer parentId)

  Set the comment parent ID

  Specified by:
    `setParentId` in interface `Comment`
  Parameters:
    `parentId` - Comment parent ID

### getIp

    public java.lang.String getIp()

  Get the IP

  Specified by:
    `getIp` in interface `Response`
  Returns:
    IP

### setIp

    public void setIp(java.lang.String ip)

  Set the IP

  Specified by:
    `setIp` in interface `Response`
  Parameters:
    `ip` - IP
  Returns:
    IP

### getStatus

    public java.lang.String getStatus()

  Get the status

  Specified by:
    `getStatus` in interface `Response`
  Returns:
    Status

### setStatus

    public void setStatus(java.lang.String status)

  Set the status

  Specified by:
    `setStatus` in interface `Response`
  Parameters:
    `status` - Status

### getDate

    public java.util.Date getDate()

  Retrieve the date for this object

  Specified by:
    `getDate` in interface `Response`
  Returns:
    Date

### getType

    public java.lang.String getType()

  Get the response type

  Specified by:
    `getType` in interface `Response`
  Returns:
    Response type

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD