Class CategoryDAO

  • All Implemented Interfaces:
    ICategoryDAO

    public final class CategoryDAO
    extends Object
    implements ICategoryDAO
    This class provides Data Access methods for Category objects
    Author:
    Laurent Payen
    • 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 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​(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