fr.paris.lutece.plugins.pluginwizard.business.model
Class PortletDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.business.model.PortletDAO
All Implemented Interfaces:
IPortletDAO

public final class PortletDAO
extends Object
implements IPortletDAO

This class provides Data Access methods for PluginPortlet objects


Constructor Summary
PortletDAO()
           
 
Method Summary
 void delete(int nPluginPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteByPlugin(int nIdPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete portlets from a given plugin
 void insert(Portlet pluginPortlet, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Portlet load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the pluginPortlet from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 Collection<Portlet> selectPluginPortletsList(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a collection of portlets associated to the generated plugin
 Collection<Portlet> selectPluginPortletsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the pluginPortlets and returns them as a collection
 void store(Portlet pluginPortlet, 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

PortletDAO

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

Specified by:
insert in interface IPortletDAO
Parameters:
pluginPortlet - instance of the PluginPortlet object to insert
plugin - The plugin

load

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

Specified by:
load in interface IPortletDAO
Parameters:
nId - The identifier of the pluginPortlet
plugin - The plugin
Returns:
the instance of the PluginPortlet

delete

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

Specified by:
delete in interface IPortletDAO
Parameters:
nPluginPortletId - The identifier of the pluginPortlet
plugin - The plugin

deleteByPlugin

public void deleteByPlugin(int nIdPortlet,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete portlets from a given plugin

Specified by:
deleteByPlugin in interface IPortletDAO
Parameters:
nIdPortlet - The identifier of the plugin
plugin - The plugin

store

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

Specified by:
store in interface IPortletDAO
Parameters:
pluginPortlet - The reference of the pluginPortlet
plugin - The plugin

selectPluginPortletsList

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

Specified by:
selectPluginPortletsList in interface IPortletDAO
Parameters:
plugin - The plugin
Returns:
The Collection which contains the data of all the pluginPortlets

selectPluginPortletsList

public Collection<Portlet> selectPluginPortletsList(int nPluginId,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a collection of portlets associated to the generated plugin

Specified by:
selectPluginPortletsList in interface IPortletDAO
Parameters:
nPluginId - The identifier of the generated plugin
plugin - The Plugin
Returns:
A collection of plugin portlets


Copyright © 2013 Mairie de Paris. All Rights Reserved.