fr.paris.lutece.plugins.calendar.business.category
Class CategoryHome

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.category.CategoryHome

public final class CategoryHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for Category objects


Method Summary
static void create(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create a new Category
static Category find(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the data of Category from the table
static java.util.Collection<Category> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the category list
static java.util.Collection<Category> findByEvent(int nIdEvent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of Category for an event from the table
static java.util.Collection<Category> findByName(java.lang.String strCategoryName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the data of Category from the table
static int findCountIdEvents(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the number of documents linked to a category
static fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return the image resource for the specified category id
static void remove(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a record from the table
static void update(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findAll

public static java.util.Collection<Category> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the category list

Parameters:
plugin - Plugin
Returns:
Collection of Category (empty collection is no result)

create

public static void create(Category category,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create a new Category

Parameters:
category - The new Category
plugin - Plugin

find

public static Category find(int nIdCategory,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the data of Category from the table

Parameters:
nIdCategory - The id of the category
plugin - Plugin
Returns:
The Instance of the object Category of null if no category match

findByName

public static java.util.Collection<Category> findByName(java.lang.String strCategoryName,
                                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the data of Category from the table

Parameters:
strCategoryName - The id of the category
plugin - Plugin
Returns:
The Collection of Category (empty collection is no result)

remove

public static void remove(int nIdCategory,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a record from the table

Parameters:
nIdCategory - The identifier of the object Category
plugin - Plugin

update

public static void update(Category category,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
category - The instance of the Category to update
plugin - Plugin

findCountIdEvents

public static int findCountIdEvents(int nIdCategory,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the number of documents linked to a category

Parameters:
nIdCategory - The category id
plugin - Plugin
Returns:
count of id document

getImageResource

public static fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nCategoryId,
                                                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the image resource for the specified category id

Parameters:
nCategoryId - The identifier of Category object
plugin - Plugin
Returns:
ImageResource

findByEvent

public static java.util.Collection<Category> findByEvent(int nIdEvent,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of Category for an event from the table

Parameters:
nIdEvent - The identifier of the event
plugin - Plugin
Returns:
The Instance of the object Category


Copyright © 2012 Mairie de Paris. All Rights Reserved.