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

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

public final class SubjectDAO
extends java.lang.Object
implements ISubjectDAO

This class provides Data Access methods for Subject objects


Constructor Summary
SubjectDAO()
           
 
Method Summary
 int countQuestion(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          return the count of all announce for Field
 void delete(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 java.util.List<Subject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all objects of this type
 java.util.List<QuestionAnswer> findQuestions(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns all questions on a subject
 fr.paris.lutece.util.ReferenceList findSubject(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all objects of this type
 void insert(Subject subject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Subject load(int nIdSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of Subject from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculate a new primary key to add a new Subject
 void store(Subject subject, 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

SubjectDAO

public SubjectDAO()
Method Detail

newPrimaryKey

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

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

insert

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

Specified by:
insert in interface ISubjectDAO
Parameters:
subject - The Instance of the object Subject
plugin - The Plugin using this data access service

delete

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

Specified by:
delete in interface ISubjectDAO
Parameters:
nIdSubject - The indentifier of the object Subject
plugin - The Plugin using this data access service

load

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

Specified by:
load in interface ISubjectDAO
Parameters:
nIdSubject - The indentifier of the object Subject
plugin - The Plugin using this data access service
Returns:
The Instance of the object Subject

store

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

Specified by:
store in interface ISubjectDAO
Parameters:
subject - The instance of the Subject to update
plugin - The Plugin using this data access service

findAll

public java.util.List<Subject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all objects of this type

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

findSubject

public fr.paris.lutece.util.ReferenceList findSubject(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all objects of this type

Specified by:
findSubject in interface ISubjectDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
A collection of objects

findQuestions

public java.util.List<QuestionAnswer> findQuestions(int nIdSubject,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all questions on a subject

Specified by:
findQuestions in interface ISubjectDAO
Parameters:
nIdSubject - The identifier of the subject
plugin - The Plugin using this data access service
Returns:
A collection of questions

countQuestion

public int countQuestion(int nIdSubject,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
return the count of all announce for Field

Specified by:
countQuestion in interface ISubjectDAO
Parameters:
plugin - The current plugin using this method
nIdSubject - The subject ID
Returns:
count of announce for Field


Copyright © 2007 Mairie de Paris. All Rights Reserved.