java.lang.Object
fr.paris.lutece.plugins.crm.business.demand.category.CategoryDAO
All Implemented Interfaces:
ICategoryDAO

public final class CategoryDAO extends Object implements ICategoryDAO
This class provides Data Access methods for Category objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    int
    insert(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nId, 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
    selectByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    selectCategoriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the category objects and returns them as a collection
    selectFirstCategory(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Select the first category
    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 Details

    • CategoryDAO

      public CategoryDAO()
  • Method Details

    • newPrimaryKey

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

      public int 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
      Returns:
      the new primary key
    • load

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

      public void delete(int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface ICategoryDAO
      Parameters:
      nCategoryId - int 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
    • selectCategoriesList

      public Collection<Category> selectCategoriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the category objects and returns them as a collection
      Specified by:
      selectCategoriesList in interface ICategoryDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The collection which contains the data of all the category objects
    • selectFirstCategory

      public Category selectFirstCategory(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select the first category
      Specified by:
      selectFirstCategory in interface ICategoryDAO
      Parameters:
      plugin - Plugin
      Returns:
      a Category
    • selectByCode

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