Class QuestionAnswerHome
java.lang.Object
fr.paris.lutece.plugins.helpdesk.business.QuestionAnswerHome
This class provides instances management methods (create, find, ...)
for QuestionAnswer objects
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intcountbySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) Count QuestionAnswewr for one Subjectstatic QuestionAnswercreate(QuestionAnswer questionanswer, fr.paris.lutece.portal.service.plugin.Plugin plugin) Creation of an instance of an article QuestionAnswerstatic List<QuestionAnswer>findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns QuestionAnswer liststatic Collection<QuestionAnswer>findByIdSubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) Find questions specified by id subjectstatic List<QuestionAnswer>findByKeywords(String strKeywords, fr.paris.lutece.portal.service.plugin.Plugin plugin) Find questions containing a list of keywordsstatic QuestionAnswerfindByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns an instance of the article QuestionAnswer whose identifier is specified in parameterstatic voidgoDown(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Move down a question into the liststatic voidgoUp(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Move up anAbstractSubjectinto the liststatic voidremove(int nIdQuestionAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the QuestionAnswer instance whose identifier is specified in parameterstatic voidremoveAll(fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes all QuestionAnswer instancesstatic voidremoveBySubject(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the QuestionAnswer instance whose identifier is specified in parameterstatic QuestionAnswerupdate(QuestionAnswer questionanswer, fr.paris.lutece.portal.service.plugin.Plugin plugin) Updates of the QuestionAnswer instance specified in parameter
-
Field Details
-
FIRST_ORDER
public static final int FIRST_ORDER- See Also:
-
-
Method Details
-
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 storeplugin- 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 storeplugin- 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 databaseplugin- 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 databaseplugin- 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 databaseplugin- The current plugin using this method- Returns:
- An instance of the QuestionAnswer which corresponds to the key
-
findAll
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 keywordsplugin- 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 subjectplugin- 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- IDplugin- 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 questionplugin- The plugin
-
goUp
public static void goUp(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Move up anAbstractSubjectinto the list- Parameters:
nId- The id of theAbstractSubjectplugin- The plugin
-