org.blojsom.blog.database
Class DatabaseTrackback

java.lang.Object
  extended byorg.blojsom.blog.database.DatabaseTrackback
All Implemented Interfaces:
Response, java.io.Serializable, Trackback
Direct Known Subclasses:
DatabasePingback

public class DatabaseTrackback
extends java.lang.Object
implements Trackback, java.io.Serializable

DatabaseTrackback

Since:
blojsom 3.0
Version:
$Id: DatabaseTrackback.java,v 1.7 2007/01/17 02:35:16 czarneckid Exp $
Author:
David Czarnecki
See Also:
Serialized Form

Field Summary
protected  java.lang.Integer _blogEntryId
           
protected  java.lang.Integer _blogId
           
protected  java.lang.String _blogName
           
protected  Entry _entry
           
protected  java.lang.String _excerpt
           
protected  java.lang.Integer _id
           
protected  java.lang.String _ip
           
protected  java.util.Map _metaData
           
protected  java.lang.String _status
           
protected  java.lang.String _title
           
protected  java.util.Date _trackbackDate
           
protected  long _trackbackDateLong
           
protected  java.lang.String _url
           
 
Fields inherited from interface org.blojsom.blog.Response
COMMENT_TYPE, PINGBACK_TYPE, TRACKBACK_TYPE
 
Constructor Summary
DatabaseTrackback()
          Create a new instance of the database trackback
 
Method Summary
 java.lang.Integer getBlogEntryId()
          Get the blog entry ID
 java.lang.Integer getBlogId()
          Get the blog ID
 java.lang.String getBlogName()
          Get the blog name of the trackback
 java.util.Date getDate()
          Retrieve the date for this object
 java.lang.String getDateAsFormat(java.lang.String format)
          Return the trackback date formatted with a specified date format
 java.lang.String getDateAsFormat(java.lang.String format, java.util.Locale locale)
          Return the trackback date formatted with a specified date format
 Entry getEntry()
          Retrieve the BlogEntry associated with this trackback
 java.lang.String getEscapedBlogName()
          Get the escaped blog name of the trackback
 java.lang.String getEscapedExcerpt()
          Get the excerpt as an escaped string
 java.lang.String getEscapedTitle()
          Get the escaped title of the trackback
 java.lang.String getEscapedUrl()
          Get the escaped url of the trackback
 java.lang.String getExcerpt()
          Get the excerpt of the trackback
 java.lang.Integer getId()
          Get the trackback ID
 java.lang.String getIp()
          Get the IP
 java.util.Map getMetaData()
          Get the trackback meta-data
 java.lang.String getStatus()
          Get the status
 java.lang.String getTitle()
          Get the title of the trackback
 java.util.Date getTrackbackDate()
          Retrieve the date this trackback was created
 long getTrackbackDateLong()
          Get the date of the trackback
 java.lang.String getType()
          Get the response type
 java.lang.String getUrl()
          Get the url of the trackback
 void setBlogEntryId(java.lang.Integer blogEntryId)
          Set the blog entry ID
 void setBlogId(java.lang.Integer blogId)
          Set the blog ID
 void setBlogName(java.lang.String blogName)
          Set the blog name of the trackback
 void setEntry(Entry entry)
          Set the BlogEntry associated with this trackback
 void setExcerpt(java.lang.String excerpt)
          Set the excerpt of the trackback
 void setId(java.lang.Integer id)
          Set the trackback ID
 void setIp(java.lang.String ip)
          Get the IP
 void setMetaData(java.util.Map metaData)
          Set the trackback meta-data
 void setStatus(java.lang.String status)
          Set the status
 void setTitle(java.lang.String title)
          Set the title of the trackback
 void setTrackbackDate(java.util.Date trackbackDate)
          Set the trackback date
 void setTrackbackDateLong(long trackbackDateLong)
          Set the date for the trackback
 void setUrl(java.lang.String url)
          Set the url of the trackback
 
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.Integer _blogId

_blogEntryId

protected java.lang.Integer _blogEntryId

_entry

protected Entry _entry

_title

protected java.lang.String _title

_excerpt

protected java.lang.String _excerpt

_url

protected java.lang.String _url

_blogName

protected java.lang.String _blogName

_trackbackDate

protected java.util.Date _trackbackDate

_trackbackDateLong

protected long _trackbackDateLong

_metaData

protected java.util.Map _metaData

_status

protected java.lang.String _status

_ip

protected java.lang.String _ip
Constructor Detail

DatabaseTrackback

public DatabaseTrackback()
Create a new instance of the database trackback

Method Detail

setId

public void setId(java.lang.Integer id)
Set the trackback ID

Specified by:
setId in interface Trackback
Parameters:
id - Trackback ID

getId

public java.lang.Integer getId()
Get the trackback ID

Specified by:
getId in interface Trackback
Returns:
Trackback ID

setBlogId

public void setBlogId(java.lang.Integer blogId)
Set the blog ID

Specified by:
setBlogId in interface Trackback
Parameters:
blogId - Blog ID

getBlogId

public java.lang.Integer getBlogId()
Get the blog ID

Specified by:
getBlogId in interface Trackback
Returns:
Blog ID

getBlogEntryId

public java.lang.Integer getBlogEntryId()
Get the blog entry ID

Specified by:
getBlogEntryId in interface Trackback
Returns:
Blog entry ID

setBlogEntryId

public void setBlogEntryId(java.lang.Integer blogEntryId)
Set the blog entry ID

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

getEntry

public Entry getEntry()
Retrieve the BlogEntry associated with this trackback

Specified by:
getEntry in interface Trackback
Returns:
BlogEntry

setEntry

public void setEntry(Entry entry)
Set the BlogEntry associated with this trackback

Specified by:
setEntry in interface Trackback
Parameters:
entry - Entry

getTitle

public java.lang.String getTitle()
Get the title of the trackback

Specified by:
getTitle in interface Trackback
Returns:
Trackback title

getEscapedTitle

public java.lang.String getEscapedTitle()
Get the escaped title of the trackback

Specified by:
getEscapedTitle in interface Trackback
Returns:
Escaped title

setTitle

public void setTitle(java.lang.String title)
Set the title of the trackback

Specified by:
setTitle in interface Trackback
Parameters:
title - Trackback title

getExcerpt

public java.lang.String getExcerpt()
Get the excerpt of the trackback

Specified by:
getExcerpt in interface Trackback
Returns:
Trackback excerpt

getEscapedExcerpt

public java.lang.String getEscapedExcerpt()
Get the excerpt as an escaped string

Specified by:
getEscapedExcerpt in interface Trackback
Returns:
Escaped excerpt

setExcerpt

public void setExcerpt(java.lang.String excerpt)
Set the excerpt of the trackback

Specified by:
setExcerpt in interface Trackback
Parameters:
excerpt - Trackback excerpt

getUrl

public java.lang.String getUrl()
Get the url of the trackback

Specified by:
getUrl in interface Trackback
Returns:
Trackback url

getEscapedUrl

public java.lang.String getEscapedUrl()
Get the escaped url of the trackback

Specified by:
getEscapedUrl in interface Trackback
Returns:
Escaped url

setUrl

public void setUrl(java.lang.String url)
Set the url of the trackback

Specified by:
setUrl in interface Trackback
Parameters:
url - Trackback url

getBlogName

public java.lang.String getBlogName()
Get the blog name of the trackback

Specified by:
getBlogName in interface Trackback
Returns:
Trackback blog name

getEscapedBlogName

public java.lang.String getEscapedBlogName()
Get the escaped blog name of the trackback

Specified by:
getEscapedBlogName in interface Trackback
Returns:
Escaped blog name

getMetaData

public java.util.Map getMetaData()
Get the trackback meta-data

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

setBlogName

public void setBlogName(java.lang.String blogName)
Set the blog name of the trackback

Specified by:
setBlogName in interface Trackback
Parameters:
blogName - Trackback blog name

setTrackbackDateLong

public void setTrackbackDateLong(long trackbackDateLong)
Set the date for the trackback

Parameters:
trackbackDateLong - Trackback date as a long value

getTrackbackDateLong

public long getTrackbackDateLong()
Get the date of the trackback

Returns:
Date of the trackback as a long

setMetaData

public void setMetaData(java.util.Map metaData)
Set the trackback meta-data

Specified by:
setMetaData in interface Trackback
Parameters:
metaData - Map containing meta-data for this trackback

getDateAsFormat

public java.lang.String getDateAsFormat(java.lang.String format)
Return the trackback date formatted with a specified date format

Specified by:
getDateAsFormat in interface Trackback
Parameters:
format - Date format
Returns:
null if the format is null, otherwise returns the trackback date formatted to the specified format. If the format is invalid, returns trackbackDate.toString()

getDateAsFormat

public java.lang.String getDateAsFormat(java.lang.String format,
                                        java.util.Locale locale)
Return the trackback date formatted with a specified date format

Specified by:
getDateAsFormat in interface Trackback
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 trackbackDate.toString()

getTrackbackDate

public java.util.Date getTrackbackDate()
Retrieve the date this trackback was created

Specified by:
getTrackbackDate in interface Trackback
Returns:
Date trackback was created

setTrackbackDate

public void setTrackbackDate(java.util.Date trackbackDate)
Set the trackback date

Specified by:
setTrackbackDate in interface Trackback
Parameters:
trackbackDate - Trackback date

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)
Get the IP

Specified by:
setIp in interface Response
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