fr.paris.lutece.plugins.helpdesk.business
Interface IQuestionTypeDAO

All Known Implementing Classes:
QuestionTypeDAO

public interface IQuestionTypeDAO

Interface for QuestionType DAO


Method Summary
 int CountUser(int nIdUser, int nIdQuestionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void delete(int nIdQuestionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 fr.paris.lutece.util.ReferenceList findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all objects
 java.util.List<VisitorQuestion> getQuestions(int nIdQuestionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the questions of a given type.
 java.util.List<QuestionType> getQuestionTypeList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all objects
 fr.paris.lutece.util.ReferenceList getQuestionTypesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 java.util.List<fr.paris.lutece.portal.business.user.AdminUser> getUsersRoles(int nIdQuestionType)
          Return all the users for a given question type.
 void insert(QuestionType questionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 QuestionType load(int nIdQuestionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of QuestionType from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculate a new primary key to add a new QuestionType
 void store(QuestionType questionType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 

Method Detail

newPrimaryKey

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

Parameters:
plugin - The Plugin using this data access service
Returns:
The new key.

delete

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

Parameters:
nIdQuestionType - the QuestionType identifier

insert

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

Parameters:
questionType - The QuestionType object

load

QuestionType load(int nIdQuestionType,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of QuestionType from the table

Parameters:
nIdQuestionType - The identifier of QuestionType
Returns:
the instance of the QuestionType

store

void store(QuestionType questionType,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
questionType - The instance of the QuestionType to update
plugin - The Plugin using this data access service

findAll

fr.paris.lutece.util.ReferenceList findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all objects

Parameters:
plugin - The Plugin using this data access service
Returns:
A Collection of objects

getQuestionTypeList

java.util.List<QuestionType> getQuestionTypeList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all objects

Parameters:
plugin - The Plugin using this data access service
Returns:
A Collection of objects

getQuestions

java.util.List<VisitorQuestion> getQuestions(int nIdQuestionType,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the questions of a given type.

Parameters:
nIdQuestionType - The identifier of the question type
plugin - The Plugin using this data access service
Returns:
A Collection of QuestionAnswer objects

getQuestionTypesList

fr.paris.lutece.util.ReferenceList getQuestionTypesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns:
listQuestionTypes

CountUser

int CountUser(int nIdUser,
              int nIdQuestionType,
              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Parameters:
plugin - The current plugin using this method
nIdUser - The user ID
nIdQuestionType - the question type ID
Returns:
count of user for question type

getUsersRoles

java.util.List<fr.paris.lutece.portal.business.user.AdminUser> getUsersRoles(int nIdQuestionType)
Return all the users for a given question type.

Parameters:
nIdQuestionType - The identifier of the question type
plugin - The Plugin using this data access service
Returns:
A Collection of AppUser objects


Copyright © 2007 Mairie de Paris. All Rights Reserved.