fr.paris.lutece.plugins.form.business
Class CategoryDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.form.business.CategoryDAO
All Implemented Interfaces:
ICategoryDAO

public class CategoryDAO
extends java.lang.Object
implements ICategoryDAO

class CategoryDAO


Constructor Summary
CategoryDAO()
           
 
Method Summary
 void delete(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 boolean isAssociateToForm(int nIdCategory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          true if there is a form associate to the category
 Category load(int idKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the category from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.List<Category> select(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all category returns them in a list
 void store(Category category, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          update record in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

store

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

Specified by:
store in interface ICategoryDAO
Parameters:
category - instance of the Category object to update
plugin - the plugin

load

public Category load(int idKey,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the category from the table

Specified by:
load in interface ICategoryDAO
Parameters:
idKey - The identifier of the category
plugin - the plugin
Returns:
the instance of the Category

select

public java.util.List<Category> select(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all category returns them in a list

Specified by:
select in interface ICategoryDAO
Parameters:
plugin - the plugin
Returns:
the list of category

delete

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

Specified by:
delete in interface ICategoryDAO
Parameters:
nIdCategory - The identifier of the category
plugin - the plugin

isAssociateToForm

public boolean isAssociateToForm(int nIdCategory,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
true if there is a form associate to the category

Specified by:
isAssociateToForm in interface ICategoryDAO
Parameters:
nIdCategory - the key of the category
plugin - the plugin
Returns:
true if there is a form associate to the category


Copyright © 2012 Mairie de Paris. All Rights Reserved.