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

java.lang.Object
  extended by fr.paris.lutece.plugins.helpdesk.business.ThemeDAO
All Implemented Interfaces:
IAbstractSubjectDAO, IThemeDAO

public final class ThemeDAO
extends java.lang.Object
implements IThemeDAO

This class provides Data Access methods for Theme objects


Constructor Summary
ThemeDAO()
           
 
Method Summary
 void delete(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 java.util.List<? extends AbstractSubject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all objects of this type
 java.util.Collection<? extends AbstractSubject> findByIdParent(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all Theme specified by the parent id
 Theme findByOrder(int nIdParent, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find a theme with the parent id and the order.
 java.util.Collection<VisitorQuestion> findQuestions(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns all questions on a Theme
 int getMaxOrder(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the max order of a parent theme
 void insert(AbstractSubject abstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Theme load(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of Theme from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Calculate a new primary key to add a new Theme
 void store(AbstractSubject abstractSubject, 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

ThemeDAO

public ThemeDAO()
Method Detail

newPrimaryKey

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

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

insert

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

Specified by:
insert in interface IAbstractSubjectDAO
Parameters:
abstractSubject - The Instance of the object theme
plugin - The Plugin using this data access service

delete

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

Specified by:
delete in interface IAbstractSubjectDAO
Parameters:
nIdTheme - The indentifier of the object Theme
plugin - The Plugin using this data access service

load

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

Specified by:
load in interface IAbstractSubjectDAO
Parameters:
nIdTheme - The indentifier of the object Theme
plugin - The Plugin using this data access service
Returns:
The Instance of the object Theme

store

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

Specified by:
store in interface IAbstractSubjectDAO
Parameters:
abstractSubject - The instance of the Theme to update
plugin - The Plugin using this data access service

findAll

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

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

findByIdParent

public java.util.Collection<? extends AbstractSubject> findByIdParent(int nIdParent,
                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all Theme specified by the parent id

Specified by:
findByIdParent in interface IAbstractSubjectDAO
Parameters:
nIdParent - The parent Theme id
plugin - The Plugin using this data access service
Returns:
A collection of Theme

findQuestions

public java.util.Collection<VisitorQuestion> findQuestions(int nIdTheme,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all questions on a Theme

Specified by:
findQuestions in interface IThemeDAO
Parameters:
nIdTheme - The identifier of the Theme
plugin - The Plugin using this data access service
Returns:
A collection of questions

getMaxOrder

public int getMaxOrder(int nIdParent,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the max order of a parent theme

Specified by:
getMaxOrder in interface IAbstractSubjectDAO
Parameters:
nIdParent - The id of the parent theme
plugin - The Plugin
Returns:
the max order

findByOrder

public Theme findByOrder(int nIdParent,
                         int nOrder,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find a theme with the parent id and the order.

Specified by:
findByOrder in interface IAbstractSubjectDAO
Parameters:
nIdParent - The parent Id
nOrder - The order
plugin - The Plugin
Returns:
the Theme


Copyright © 2008 Mairie de Paris. All Rights Reserved.