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

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

public final class QuestionTypeDAO
extends java.lang.Object
implements IQuestionTypeDAO

This class provides Data Access methods for QuestionType objects


Constructor Summary
QuestionTypeDAO()
           
 
Method Summary
 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
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionTypeDAO

public QuestionTypeDAO()
Method Detail

newPrimaryKey

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

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

insert

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

Specified by:
insert in interface IQuestionTypeDAO
Parameters:
questionType - The Instance of the object QuestionType
plugin - The Plugin using this data access service

delete

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

Specified by:
delete in interface IQuestionTypeDAO
Parameters:
nIdQuestionType - The indentifier of the object QuestionType
plugin - The Plugin using this data access service

load

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

Specified by:
load in interface IQuestionTypeDAO
Parameters:
nIdQuestionType - The indentifier of the object QuestionType
plugin - The Plugin using this data access service
Returns:
The Instance of the object QuestionType

store

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

Specified by:
store in interface IQuestionTypeDAO
Parameters:
questionType - The instance of the QuestionType to update
plugin - The Plugin using this data access service

findAll

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

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

getQuestionTypeList

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

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

getQuestions

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

Specified by:
getQuestions in interface IQuestionTypeDAO
Parameters:
nIdQuestionType - The identifier of the question type
plugin - The Plugin using this data access service
Returns:
A Collection of QuestionAnswer objects


Copyright © 2007 Mairie de Paris. All Rights Reserved.