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

java.lang.Object
  extended by fr.paris.lutece.plugins.myportal.business.WidgetHome

public final class WidgetHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for Widget objects


Method Summary
static Widget create(Widget widget)
          Create an instance of the widget class
static Widget findByPrimaryKey(int nKey)
          Returns an instance of a widget whose identifier is specified in parameter
static java.util.List<Widget> getPublicMandatoryWidgets()
          Get the list of public or mandatory widgets
static java.util.List<Widget> getWidgetsByFilter(WidgetFilter wFilter)
          Get the list of widgets by filter
static java.util.Collection<Widget> getWidgetsList()
          Load the data of all the widget objects and returns them in form of a collection
static int newPrimaryKey()
          Generates a new primary key
static void remove(int nWidgetId)
          Remove the widget whose identifier is specified in parameter
static Widget update(Widget widget)
          Update of the widget which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newPrimaryKey

public static int newPrimaryKey()
Generates a new primary key

Returns:
The new primary key

create

public static Widget create(Widget widget)
Create an instance of the widget class

Parameters:
widget - The instance of the Widget which contains the informations to store
Returns:
The instance of widget which has been created with its primary key.

update

public static Widget update(Widget widget)
Update of the widget which is specified in parameter

Parameters:
widget - The instance of the Widget which contains the data to store
Returns:
The instance of the widget which has been updated

remove

public static void remove(int nWidgetId)
Remove the widget whose identifier is specified in parameter

Parameters:
nWidgetId - The widget Id

findByPrimaryKey

public static Widget findByPrimaryKey(int nKey)
Returns an instance of a widget whose identifier is specified in parameter

Parameters:
nKey - The widget primary key
Returns:
an instance of Widget

getWidgetsList

public static java.util.Collection<Widget> getWidgetsList()
Load the data of all the widget objects and returns them in form of a collection

Returns:
the collection which contains the data of all the widget objects

getPublicMandatoryWidgets

public static java.util.List<Widget> getPublicMandatoryWidgets()
Get the list of public or mandatory widgets

Returns:
the list widgets

getWidgetsByFilter

public static java.util.List<Widget> getWidgetsByFilter(WidgetFilter wFilter)
Get the list of widgets by filter

Parameters:
wFilter - the filter
Returns:
a list of Widget


Copyright © 2011 Mairie de Paris. All Rights Reserved.