fr.paris.lutece.plugins.helpdesk.business
Class QuestionAnswerDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.helpdesk.business.QuestionAnswerDAO
All Implemented Interfaces:
IQuestionAnswerDAO

public final class QuestionAnswerDAO
extends java.lang.Object
implements IQuestionAnswerDAO

This class provides Data Access methods for QuestionAnswerAnswer objects


Constructor Summary
QuestionAnswerDAO()
           
 
Method Summary
 int countbySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void delete(int nIdQuestionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteBySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 java.util.List<QuestionAnswer> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all objects.
 java.util.List<QuestionAnswer> findByKeywords(java.lang.String strKeywords, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of QuestionAnswer from the table
 void insert(QuestionAnswer questionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 QuestionAnswer load(int nIdQuestionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of QuestionAnswer from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculate a new primary key to add a new QuestionAnswer
 void store(QuestionAnswer questionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionAnswerDAO

public QuestionAnswerDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate a new primary key to add a new QuestionAnswer

Specified by:
newPrimaryKey in interface IQuestionAnswerDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
The new key.

insert

public void insert(QuestionAnswer questionAnswer,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IQuestionAnswerDAO
Parameters:
questionAnswer - The Instance of the object QuestionAnswer
plugin - The Plugin using this data access service

delete

public void delete(int nIdQuestionAnswer,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IQuestionAnswerDAO
Parameters:
nIdQuestionAnswer - The indentifier of the object QuestionAnswer
plugin - The Plugin using this data access service

deleteBySubject

public void deleteBySubject(int nIdSubject,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
deleteBySubject in interface IQuestionAnswerDAO
Parameters:
nIdSubject - The indentifier of the object QuestionAnswer
plugin - The Plugin using this data access service

load

public QuestionAnswer load(int nIdQuestionAnswer,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of QuestionAnswer from the table

Specified by:
load in interface IQuestionAnswerDAO
Parameters:
nIdQuestionAnswer - The indentifier of the object QuestionAnswer
plugin - The Plugin using this data access service
Returns:
The Instance of the object QuestionAnswer

store

public void store(QuestionAnswer questionAnswer,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IQuestionAnswerDAO
Parameters:
questionAnswer - The instance of the QuestionAnswer to update
plugin - The Plugin using this data access service

findAll

public java.util.List<QuestionAnswer> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all objects.

Specified by:
findAll in interface IQuestionAnswerDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
A Collection of objects

findByKeywords

public java.util.List<QuestionAnswer> findByKeywords(java.lang.String strKeywords,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of QuestionAnswer from the table

Specified by:
findByKeywords in interface IQuestionAnswerDAO
Parameters:
strKeywords - The keywords which are searched in question/answer
plugin - The Plugin using this data access service
Returns:
The collection of QuestionAnswer object

countbySubject

public int countbySubject(int nIdSubject,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
countbySubject in interface IQuestionAnswerDAO
Parameters:
plugin - The Plugin using this data access service
nIdSubject - The Subject ID
Returns:
count


Copyright © 2007 Mairie de Paris. All Rights Reserved.