Class CategoryDAO
- 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 CategoryDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tableintinsert(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Categoryload(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyCategoryselectByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)Collection<Category>selectCategoriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the category objects and returns them as a collectionCategoryselectFirstCategory(fr.paris.lutece.portal.service.plugin.Plugin plugin)Select the first categoryvoidstore(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the table
-
-
-
Method Detail
-
newPrimaryKey
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key- Specified by:
newPrimaryKeyin interfaceICategoryDAO- 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:
insertin interfaceICategoryDAO- Parameters:
category- instance of the Category object to insertplugin- 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:
loadin interfaceICategoryDAO- Parameters:
nId- The identifier of the categoryplugin- 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:
deletein interfaceICategoryDAO- Parameters:
nCategoryId- int identifier of the Category to deleteplugin- the Plugin
-
store
public void store(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table- Specified by:
storein interfaceICategoryDAO- Parameters:
category- the reference of the Categoryplugin- 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:
selectCategoriesListin interfaceICategoryDAO- 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:
selectFirstCategoryin interfaceICategoryDAO- Parameters:
plugin-Plugin- Returns:
- a
Category
-
selectByCode
public Category selectByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectByCodein interfaceICategoryDAO
-
-