Class ThemeDAO
java.lang.Object
fr.paris.lutece.plugins.helpdesk.business.ThemeDAO
- All Implemented Interfaces:
IAbstractSubjectDAO,IThemeDAO
This class provides Data Access methods for Theme objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablevoiddeleteAllLinksToFaq(int nIdAbstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) delete a record in the table.voiddeleteLinkToFaq(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 typefindByFaqOrder(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 allThemespecified by the Faq idCollection<? extends AbstractSubject>findByIdParent(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin) Finds allThemespecified by the parent idfindByOrder(int nIdParent, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin) Find a theme with the parent id and the order.findQuestions(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns all questions on a ThemeintgetMaxOrder(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the max order of a parent themevoidinsert(AbstractSubject abstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.voidinsertLinkToFaq(int nIdAbstractSubject, int nIdFaq, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.load(int nIdTheme, fr.paris.lutece.portal.service.plugin.Plugin plugin) load the data of Theme from the tableintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin) Calculate a new primary key to add a new Themevoidstore(AbstractSubject abstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the table
-
Constructor Details
-
ThemeDAO
public ThemeDAO()
-
-
Method Details
-
newPrimaryKey
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin) Calculate a new primary key to add a new Theme- Specified by:
newPrimaryKeyin interfaceIAbstractSubjectDAO- 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:
insertin interfaceIAbstractSubjectDAO- Parameters:
abstractSubject- The Instance of the object themeplugin- 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:
deletein interfaceIAbstractSubjectDAO- Parameters:
nIdTheme- The indentifier of the object Themeplugin- The Plugin using this data access service
-
load
load the data of Theme from the table- Specified by:
loadin interfaceIAbstractSubjectDAO- Parameters:
nIdTheme- The indentifier of the object Themeplugin- 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:
storein interfaceIAbstractSubjectDAO- Parameters:
abstractSubject- The instance of the Theme to updateplugin- The Plugin using this data access service
-
findAll
Finds all objects of this type- Specified by:
findAllin interfaceIAbstractSubjectDAO- 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 allThemespecified by the parent id- Specified by:
findByIdParentin interfaceIAbstractSubjectDAO- Parameters:
nIdParent- The parent Theme idplugin- 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 allThemespecified by the Faq id- Specified by:
findByIdFaqin interfaceIAbstractSubjectDAO- Parameters:
nIdFaq- The faq idplugin- 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:
findQuestionsin interfaceIThemeDAO- Parameters:
nIdTheme- The identifier of the Themeplugin- 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:
getMaxOrderin interfaceIAbstractSubjectDAO- Parameters:
nIdParent- The id of the parent themeplugin- ThePlugin- 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:
findByOrderin interfaceIAbstractSubjectDAO- Parameters:
nIdParent- The parent IdnOrder- The orderplugin- ThePlugin- 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:
findByFaqOrderin interfaceIAbstractSubjectDAO- Parameters:
nIdFaq- The faq IdnOrder- The orderplugin- ThePlugin- 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:
insertLinkToFaqin interfaceIAbstractSubjectDAO- Parameters:
nIdAbstractSubject- The id of the object ThemenIdFaq- The parent id of the object Faqplugin- 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:
deleteLinkToFaqin interfaceIAbstractSubjectDAO- Parameters:
nIdAbstractSubject- The id of the object ThemenIdFaq- The parent id of the object Faqplugin- 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:
deleteAllLinksToFaqin interfaceIAbstractSubjectDAO- Parameters:
nIdAbstractSubject- The id of the object Themeplugin- The Plugin using this data access service
-