Class CategoryDAO

  • All Implemented Interfaces:
    ICategoryDAO

    public final class CategoryDAO
    extends java.lang.Object
    implements ICategoryDAO
    This class provides Data Access methods for Category objects
    Author:
    Laurent Payen
    • Constructor Summary

      Constructors 
      Constructor Description
      CategoryDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      java.util.List<Category> findAllCategories​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find all the categories
      Category findByLabel​(java.lang.String strLabel, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a category by its category label
      void insert​(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Category select​(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      void update​(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CategoryDAO

        public CategoryDAO()
    • Method Detail

      • insert

        public void insert​(Category category,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Insert a new record in the table.
        Specified by:
        insert in interface ICategoryDAO
        Parameters:
        category - instance of the Category object to insert
        plugin - the Plugin
      • update

        public void update​(Category category,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Update the record in the table
        Specified by:
        update in interface ICategoryDAO
        Parameters:
        category - the reference of the Category
        plugin - the Plugin
      • delete

        public void delete​(int nIdCategory,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Delete a record from the table
        Specified by:
        delete in interface ICategoryDAO
        Parameters:
        nIdCategory - identifier of the Category to delete
        plugin - the Plugin
      • select

        public Category select​(int nIdCategory,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Load the data from the table
        Specified by:
        select in interface ICategoryDAO
        Parameters:
        nIdCategory - The identifier of the Category
        plugin - the Plugin
        Returns:
        The instance of the Category
      • findAllCategories

        public java.util.List<Category> findAllCategories​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Find all the categories
        Specified by:
        findAllCategories in interface ICategoryDAO
        Parameters:
        plugin - the plugin
        Returns:
        a list of all the categories
      • findByLabel

        public Category findByLabel​(java.lang.String strLabel,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ICategoryDAO
        Find a category by its category label
        Specified by:
        findByLabel in interface ICategoryDAO
        Parameters:
        strLabel - the label
        plugin - the plugin
        Returns:
        an instance of the category