fr.paris.lutece.plugins.mypage.business
Class WidgetDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mypage.business.WidgetDAO
All Implemented Interfaces:
IWidgetDAO

public final class WidgetDAO
extends java.lang.Object
implements IWidgetDAO

This class provides Data Access methods for Widget objects


Constructor Summary
WidgetDAO()
           
 
Method Summary
 void delete(int nWidgetId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Widget widget, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Widget load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the widget from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.List<Widget> selectWidgetsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the widgets and returns them as a List
 void store(Widget widget, 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

WidgetDAO

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

Specified by:
insert in interface IWidgetDAO
Parameters:
widget - instance of the Widget object to insert
plugin - The plugin

load

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

Specified by:
load in interface IWidgetDAO
Parameters:
nId - The identifier of the widget
plugin - The plugin
Returns:
the instance of the Widget

delete

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

Specified by:
delete in interface IWidgetDAO
Parameters:
nWidgetId - The identifier of the widget
plugin - The plugin

store

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

Specified by:
store in interface IWidgetDAO
Parameters:
widget - The reference of the widget
plugin - The plugin

selectWidgetsList

public java.util.List<Widget> selectWidgetsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the widgets and returns them as a List

Specified by:
selectWidgetsList in interface IWidgetDAO
Parameters:
plugin - The plugin
Returns:
The List which contains the data of all the widgets


Copyright © 2011 Mairie de Paris. All Rights Reserved.