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

java.lang.Object
  extended by fr.paris.lutece.plugins.helpdesk.business.QuestionAnswerHome

public final class QuestionAnswerHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for QuestionAnswer objects


Method Summary
static int countbySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Count QuestionAnswewr for one Subject
static QuestionAnswer create(QuestionAnswer questionanswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of an article QuestionAnswer
static java.util.List<QuestionAnswer> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns QuestionAnswer list
static java.util.List<QuestionAnswer> findByKeywords(java.lang.String strKeywords, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find questions containing a list of keywords
static QuestionAnswer findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of the article QuestionAnswer whose identifier is specified in parameter
static void remove(int nIdQuestionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes the QuestionAnswer instance whose identifier is specified in parameter
static void removeBySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes the QuestionAnswer instance whose identifier is specified in parameter
static QuestionAnswer update(QuestionAnswer questionanswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates of the QuestionAnswer instance specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static QuestionAnswer create(QuestionAnswer questionanswer,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of an article QuestionAnswer

Parameters:
questionanswer - An instance of the QuestionAnswer which contains the informations to store
plugin - The current plugin using this method
Returns:
The instance of the QuestionAnswer which has been created

update

public static QuestionAnswer update(QuestionAnswer questionanswer,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates of the QuestionAnswer instance specified in parameter

Parameters:
questionanswer - An instance of the QuestionAnswer which contains the informations to store
plugin - The current plugin using this method
Returns:
The instance of the QuestionAnswer which has been updated.

remove

public static void remove(int nIdQuestionAnswer,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes the QuestionAnswer instance whose identifier is specified in parameter

Parameters:
nIdQuestionAnswer - The identifier of the article QuestionAnswer to delete in the database
plugin - The current plugin using this method

removeBySubject

public static void removeBySubject(int nIdSubject,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes the QuestionAnswer instance whose identifier is specified in parameter

Parameters:
nIdSubject - The identifier of the article QuestionAnswer to delete in the database
plugin - The current plugin using this method

findByPrimaryKey

public static QuestionAnswer findByPrimaryKey(int nKey,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of the article QuestionAnswer whose identifier is specified in parameter

Parameters:
nKey - The primary key of the article to find in the database
plugin - The current plugin using this method
Returns:
An instance of the QuestionAnswer which corresponds to the key

findAll

public static java.util.List<QuestionAnswer> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns QuestionAnswer list

Parameters:
plugin - The current plugin using this method
Returns:
the list of the QuestionAnswer of the database in form of a QuestionAnswer Collection object

findByKeywords

public static java.util.List<QuestionAnswer> findByKeywords(java.lang.String strKeywords,
                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find questions containing a list of keywords

Parameters:
strKeywords - The keywords
plugin - The current plugin using this method
Returns:
A Collection containing the results

countbySubject

public static int countbySubject(int nIdSubject,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Count QuestionAnswewr for one Subject

Parameters:
nIdSubject - ID
plugin - The current plugin using this method
Returns:
The count of the QuestionAnswer for this ID.


Copyright © 2007 Mairie de Paris. All Rights Reserved.