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

java.lang.Object
  extended by fr.paris.lutece.plugins.myportal.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
 java.util.List<Widget> getPublicMandatoryWidgets(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of public or mandatory widgets
 java.util.List<Widget> getWidgetsByFilter(WidgetFilter wFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of widgets by filter
 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.Collection<Widget> selectWidgetsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the widgets and returns them as a collection
 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

Specified by:
newPrimaryKey in interface IWidgetDAO
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.Collection<Widget> selectWidgetsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the widgets and returns them as a collection

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

getPublicMandatoryWidgets

public java.util.List<Widget> getPublicMandatoryWidgets(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of public or mandatory widgets

Specified by:
getPublicMandatoryWidgets in interface IWidgetDAO
Parameters:
plugin - Plugin
Returns:
the list widgets

getWidgetsByFilter

public java.util.List<Widget> getWidgetsByFilter(WidgetFilter wFilter,
                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of widgets by filter

Specified by:
getWidgetsByFilter in interface IWidgetDAO
Parameters:
wFilter - the filter
plugin - Plugin
Returns:
a list of Widget


Copyright © 2012 Mairie de Paris. All Rights Reserved.