org.apache.lokahi.core.gui.help
Class HelpItemDAO

java.lang.Object
  extended by org.apache.lokahi.core.gui.help.HelpItemDAO
All Implemented Interfaces:
Collectable, Dao

public class HelpItemDAO
extends java.lang.Object
implements Dao, Collectable

Version:
$Id: HelpItemDAO.java,v 1.4 2006/03/07 20:18:57 drtobes Exp $
Author:
Stephen Toback

Constructor Summary
HelpItemDAO()
           
HelpItemDAO(int pk, java.lang.String title, java.lang.String topic, java.lang.String subtopic, java.lang.String summary, int functionId, java.sql.Blob content, int valid)
           
HelpItemDAO(java.lang.String title, java.lang.String topic, java.lang.String subtopic, java.lang.String summary, int functionId, int valid)
           
 
Method Summary
 org.jdom.Element buildShortXMLRepresentation()
           
 org.jdom.Element buildXMLRepresention()
           
static boolean delete(HelpItemDAO hi)
           
 boolean equals(java.lang.Object o)
           
 HelpItemDAO fillObject(java.sql.ResultSet r)
          Creates the Dao from the passed resultset, internally calling the appriate constructor.
 java.lang.String getContent()
           
 Function getFunction()
           
 int getFunctionId()
           
static HelpItemDAO getHelpItem(int id)
           
static java.util.Collection<HelpItemDAO> getHelpItems()
           
static java.util.Collection<HelpItemDAO> getHelpItems(int functionId, int valid)
           
static java.util.Collection getHelpItems(java.lang.String keyword, int valid)
           
 java.lang.String[] getKeywords()
           
 java.lang.String[] getKeywordsForWeb()
           
static java.util.Collection<HelpItemDAO> getMenu(User u)
           
 java.lang.String getName()
          Gets the name.
 int getPk()
          Gets the primary key
 java.lang.String getSubtopic()
           
 java.lang.String getSummary()
           
 java.lang.String getTitle()
           
 java.lang.String getTopic()
           
 int getValid()
           
 int hashCode()
           
 boolean isValid()
           
 void setContent(java.sql.Blob content)
           
 void setContent(java.lang.String content)
           
 void setFunction(Function f)
           
 void setFunctionId(int functionId)
           
 void setKeywords(java.lang.String[] keywords)
           
 void setName(java.lang.String title)
           
 void setPk(int pk)
           
 void setSubtopic(java.lang.String subtopic)
           
 void setSummary(java.lang.String summary)
           
 void setTitle(java.lang.String title)
           
 void setTopic(java.lang.String topic)
           
 void setValid(boolean valid)
           
 void setValid(int valid)
           
static HelpItemDAO store(HelpItemDAO hi)
           
 java.lang.String toString()
           
static void update(HelpItemDAO hi)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HelpItemDAO

public HelpItemDAO()

HelpItemDAO

public HelpItemDAO(java.lang.String title,
                   java.lang.String topic,
                   java.lang.String subtopic,
                   java.lang.String summary,
                   int functionId,
                   int valid)

HelpItemDAO

public HelpItemDAO(int pk,
                   java.lang.String title,
                   java.lang.String topic,
                   java.lang.String subtopic,
                   java.lang.String summary,
                   int functionId,
                   java.sql.Blob content,
                   int valid)
            throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

buildXMLRepresention

public org.jdom.Element buildXMLRepresention()

buildShortXMLRepresentation

public org.jdom.Element buildShortXMLRepresentation()

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 title)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getTopic

public java.lang.String getTopic()

setTopic

public void setTopic(java.lang.String topic)

getSubtopic

public java.lang.String getSubtopic()

setSubtopic

public void setSubtopic(java.lang.String subtopic)

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

setContent

public void setContent(java.sql.Blob content)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

getSummary

public java.lang.String getSummary()

setSummary

public void setSummary(java.lang.String summary)

getKeywords

public java.lang.String[] getKeywords()

getKeywordsForWeb

public java.lang.String[] getKeywordsForWeb()

setKeywords

public void setKeywords(java.lang.String[] keywords)

getFunction

public Function getFunction()

setFunction

public void setFunction(Function f)

isValid

public boolean isValid()

setValid

public void setValid(boolean valid)

getFunctionId

public int getFunctionId()

setFunctionId

public void setFunctionId(int functionId)

getValid

public int getValid()

setValid

public void setValid(int valid)

fillObject

public HelpItemDAO 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

getMenu

public static java.util.Collection<HelpItemDAO> getMenu(User u)

getHelpItem

public static HelpItemDAO getHelpItem(int id)

getHelpItems

public static java.util.Collection<HelpItemDAO> getHelpItems(int functionId,
                                                             int valid)

getHelpItems

public static java.util.Collection<HelpItemDAO> getHelpItems()

getHelpItems

public static java.util.Collection getHelpItems(java.lang.String keyword,
                                                int valid)

store

public static HelpItemDAO store(HelpItemDAO hi)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

delete

public static boolean delete(HelpItemDAO hi)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

update

public static void update(HelpItemDAO hi)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

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