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
    • Constructor Summary

      Constructors 
      Constructor Description
      CategoryDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Category findByCode​(java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      void insert​(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Category load​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      int newPrimaryKey​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Generates a new primary key
      java.util.List<Category> selectCategoriesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      java.util.List<Category> selectDefaultCategoriesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      void store​(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

      • newPrimaryKey

        public int newPrimaryKey​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Generates a new primary key
        Parameters:
        plugin - The Plugin
        Returns:
        The new primary key
      • insert

        public void insert​(Category category,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        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
      • load

        public Category load​(int nKey,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface ICategoryDAO
        Parameters:
        nKey - The identifier of the category
        plugin - the Plugin
        Returns:
        The instance of the category
      • delete

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

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

        public Category findByCode​(java.lang.String strCode,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        findByCode in interface ICategoryDAO