fr.paris.lutece.plugins.appstore.business
Class ComponentDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.appstore.business.ComponentDAO
All Implemented Interfaces:
IComponentDAO

public final class ComponentDAO
extends Object
implements IComponentDAO

This class provides Data Access methods for Component objects


Constructor Summary
ComponentDAO()
           
 
Method Summary
 void delete(int nComponentId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Component component, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Component load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the component from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 List<Component> selectByApplication(int nApplicationId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of component used by the application
 Collection<Component> selectComponentsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the components and returns them as a collection
 void store(Component component, 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
 

Constructor Detail

ComponentDAO

public ComponentDAO()
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(Component component,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IComponentDAO
Parameters:
component - instance of the Component object to insert
plugin - The plugin

load

public Component load(int nId,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the component from the table

Specified by:
load in interface IComponentDAO
Parameters:
nId - The identifier of the component
plugin - The plugin
Returns:
the instance of the Component

delete

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

Specified by:
delete in interface IComponentDAO
Parameters:
nComponentId - The identifier of the component
plugin - The plugin

store

public void store(Component component,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IComponentDAO
Parameters:
component - The reference of the component
plugin - The plugin

selectComponentsList

public Collection<Component> selectComponentsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the components and returns them as a collection

Specified by:
selectComponentsList in interface IComponentDAO
Parameters:
plugin - The plugin
Returns:
The Collection which contains the data of all the components

selectByApplication

public List<Component> selectByApplication(int nApplicationId,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface: IComponentDAO
Returns a list of component used by the application

Specified by:
selectByApplication in interface IComponentDAO
Parameters:
nApplicationId - The application ID
Returns:
a List of Component


Copyright © 2013 Mairie de Paris. All Rights Reserved.