Class CategoryDAO

  • All Implemented Interfaces:
    ICategoryDAO

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