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 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
 void deleteAllLinksToFaq(int nIdAbstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          delete a record in the table.
 void deleteLinkToFaq(int nIdAbstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          delete a record in the table.
 List<? extends AbstractSubject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all objects of this type
 Theme findByFaqOrder(int nIdFaq, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find a theme with the faq id and the order.
 Collection<? extends AbstractSubject> findByIdFaq(int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all Theme specified by the Faq id
 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.
 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.
 void insertLinkToFaq(int nIdAbstractSubject, int nIdFaq, 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 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 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

findByIdFaq

public Collection<? extends AbstractSubject> findByIdFaq(int nIdFaq,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all Theme specified by the Faq id

Specified by:
findByIdFaq in interface IAbstractSubjectDAO
Parameters:
nIdFaq - The faq id
plugin - The Plugin using this data access service
Returns:
A collection of Theme

findQuestions

public 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

findByFaqOrder

public Theme findByFaqOrder(int nIdFaq,
                            int nOrder,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find a theme with the faq id and the order.

Specified by:
findByFaqOrder in interface IAbstractSubjectDAO
Parameters:
nIdFaq - The faq Id
nOrder - The order
plugin - The Plugin
Returns:
the Theme

insertLinkToFaq

public void insertLinkToFaq(int nIdAbstractSubject,
                            int nIdFaq,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insertLinkToFaq in interface IAbstractSubjectDAO
Parameters:
nIdAbstractSubject - The id of the object Theme
nIdFaq - The parent id of the object Faq
plugin - The Plugin using this data access service

deleteLinkToFaq

public void deleteLinkToFaq(int nIdAbstractSubject,
                            int nIdFaq,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete a record in the table.

Specified by:
deleteLinkToFaq in interface IAbstractSubjectDAO
Parameters:
nIdAbstractSubject - The id of the object Theme
nIdFaq - The parent id of the object Faq
plugin - The Plugin using this data access service

deleteAllLinksToFaq

public void deleteAllLinksToFaq(int nIdAbstractSubject,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete a record in the table.

Specified by:
deleteAllLinksToFaq in interface IAbstractSubjectDAO
Parameters:
nIdAbstractSubject - The id of the object Theme
plugin - The Plugin using this data access service


Copyright © 2013 Mairie de Paris. All Rights Reserved.