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 Object

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


Field Summary
static int FIRST_ORDER
           
 
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 List<QuestionAnswer> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns QuestionAnswer list
static Collection<QuestionAnswer> findByIdSubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find questions specified by id subject
static List<QuestionAnswer> findByKeywords(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 goDown(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Move down a question into the list
static void goUp(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Move up an AbstractSubject into the list
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 removeAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes all QuestionAnswer instances
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
 

Field Detail

FIRST_ORDER

public static final int FIRST_ORDER
See Also:
Constant Field Values
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

removeAll

public static void removeAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes all QuestionAnswer instances

Parameters:
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 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 List<QuestionAnswer> findByKeywords(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

findByIdSubject

public static Collection<QuestionAnswer> findByIdSubject(int nIdSubject,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find questions specified by id subject

Parameters:
nIdSubject - The Id of the subject
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.

goDown

public static void goDown(int nId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Move down a question into the list

Parameters:
nId - The id of the question
plugin - The plugin

goUp

public static void goUp(int nId,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Move up an AbstractSubject into the list

Parameters:
nId - The id of the AbstractSubject
plugin - The plugin


Copyright © 2013 Mairie de Paris. All Rights Reserved.