org.apache.lokahi.core.api.alert
Class AlertDAO
java.lang.Object
org.apache.lokahi.core.api.alert.AlertDAO
- All Implemented Interfaces:
- Collectable, Dao, Datable
public class AlertDAO
- extends java.lang.Object
- implements Datable, Dao, Collectable
- Version:
- $Id: AlertDAO.java,v 1.4 2006/03/07 20:18:56 drtobes Exp $
- Author:
- Stephen Toback
Constructor Summary |
AlertDAO()
|
AlertDAO(int id,
java.lang.String title,
int authorId,
java.util.Date submissionDate,
java.lang.String Link,
java.sql.Blob content)
|
AlertDAO(java.lang.String title,
java.lang.String content,
User author)
|
AlertDAO(java.lang.String title,
User author,
java.lang.String Content)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AlertDAO
public AlertDAO()
AlertDAO
public AlertDAO(int id,
java.lang.String title,
int authorId,
java.util.Date submissionDate,
java.lang.String Link,
java.sql.Blob content)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
AlertDAO
public AlertDAO(java.lang.String title,
User author,
java.lang.String Content)
AlertDAO
public AlertDAO(java.lang.String title,
java.lang.String content,
User author)
getPk
public int getPk()
- Description copied from interface:
Collectable
- Gets the primary key
- Specified by:
getPk
in interface Collectable
- Returns:
- the
int
primary key
setPk
public void setPk(int pk)
getName
public java.lang.String getName()
- Description copied from interface:
Collectable
- Gets the name.
- Specified by:
getName
in interface Collectable
- Returns:
- the
String
name.
setName
public void setName(java.lang.String name)
setLink
public void setLink(java.lang.String link)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
setLink
public void setLink(java.net.URL link)
getLink
public java.lang.String getLink()
getContent
public java.lang.String getContent()
setEntry
public void setEntry(java.sql.Blob content)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setContent
public void setContent(java.lang.String content)
getAuthorId
public int getAuthorId()
setAuthorId
public void setAuthorId(int authorId)
getFormat
public boolean getFormat()
setFormat
public void setFormat(boolean flag)
getAuthor
public User getAuthor()
setAuthor
public void setAuthor(User author)
getSubmissionDate
public java.util.Date getSubmissionDate()
getSubmissionDateAsText
public java.lang.String getSubmissionDateAsText()
setSubmissionDate
public void setSubmissionDate(java.util.Date submissionDate)
fillObject
public AlertDAO fillObject(java.sql.ResultSet r)
throws java.sql.SQLException
- Description copied from interface:
Dao
- Creates the Dao from the passed resultset,
internally calling the appriate constructor.
- Specified by:
fillObject
in interface Dao
- Parameters:
r
- the resultset from a database call,
should include the entire object
- Returns:
- Object populated from the resultset
- Throws:
java.sql.SQLException
buildHTML
public java.lang.String buildHTML()
delete
public static boolean delete(AlertDAO al)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
deleteRelationToProjs
public boolean deleteRelationToProjs()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
store
public static AlertDAO store(AlertDAO al)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
update
public static void update(AlertDAO al)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
storeRelatedProjects
public void storeRelatedProjects()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getCurrentAlertsForAll
public static java.util.Collection<AlertDAO> getCurrentAlertsForAll()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getAlertById
public static AlertDAO getAlertById(int id)
getSortOnDate
public java.util.Date getSortOnDate()
- Specified by:
getSortOnDate
in interface Datable
buildXMLRepresention
public org.jdom.Element buildXMLRepresention()
buildShortXMLRepresentation
public org.jdom.Element buildShortXMLRepresentation()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object