Class CategoryDAO
java.lang.Object
fr.paris.lutece.plugins.document.business.category.CategoryDAO
- All Implemented Interfaces:
ICategoryDAO
This class provides Data Access methods for Category objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nIdCategory) Delete a record from the tablevoiddeleteLinkCategoryDocument(int nIdCategory, int nIdDocument) Delete a link between category and documentvoiddeleteLinksCategory(int nIdCategory) Delete all links for a categoryvoidInsert a new Categoryload(int nIdCategory) Load the data of Category from the tablefr.paris.lutece.portal.service.image.ImageResourceloadImageResource(int nCategoryId) Return the image resource corresponding to the category idLoad the list of Categoryint[]selectAllIdDocument(int nIdCategory) Select a list of Id Documents for a specified categoryselectByName(String strCategoryName) Load the data of Category from the tableintselectCountIdDocuments(int nIdCategory) Return the number of documents linked to a categoryvoidUpdate the record in the table
-
Constructor Details
-
CategoryDAO
public CategoryDAO()
-
-
Method Details
-
selectAll
Load the list of Category- Specified by:
selectAllin interfaceICategoryDAO- Returns:
- The Collection of Category (empty collection is no result)
-
insert
Insert a new Category- Specified by:
insertin interfaceICategoryDAO- Parameters:
category- The object category to insert
-
load
Load the data of Category from the table- Specified by:
loadin interfaceICategoryDAO- Parameters:
nIdCategory- The identifier of the category- Returns:
- The Instance of the object Category
-
delete
public void delete(int nIdCategory) Delete a record from the table- Specified by:
deletein interfaceICategoryDAO- Parameters:
nIdCategory- The identifier of the object Category
-
store
Update the record in the table- Specified by:
storein interfaceICategoryDAO- Parameters:
category- The instance of the Category to update
-
selectByName
Load the data of Category from the table- Specified by:
selectByNamein interfaceICategoryDAO- Parameters:
strCategoryName- The name of the category- Returns:
- The Collection of Category (empty collection is no result)
-
deleteLinkCategoryDocument
public void deleteLinkCategoryDocument(int nIdCategory, int nIdDocument) Delete a link between category and document- Parameters:
nIdCategory- The identifier of the object CategorynIdDocument- The id of document
-
selectAllIdDocument
public int[] selectAllIdDocument(int nIdCategory) Select a list of Id Documents for a specified category- Parameters:
nIdCategory- The category name- Returns:
- The array of Id Document
-
deleteLinksCategory
public void deleteLinksCategory(int nIdCategory) Delete all links for a category- Parameters:
nIdCategory- The identifier of the object Category
-
selectCountIdDocuments
public int selectCountIdDocuments(int nIdCategory) Return the number of documents linked to a category- Specified by:
selectCountIdDocumentsin interfaceICategoryDAO- Parameters:
nIdCategory- The category name- Returns:
- count of id document
-
loadImageResource
public fr.paris.lutece.portal.service.image.ImageResource loadImageResource(int nCategoryId) Return the image resource corresponding to the category id- Specified by:
loadImageResourcein interfaceICategoryDAO- Parameters:
nCategoryId- The identifier of Category object- Returns:
- The image resource
-