fr.paris.lutece.plugins.myapps.modules.database.business
Class MyAppsDatabaseDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.myapps.modules.database.business.MyAppsDatabaseDAO
All Implemented Interfaces:
IMyAppsDatabaseDAO

public final class MyAppsDatabaseDAO
extends java.lang.Object
implements IMyAppsDatabaseDAO

MyAppsDatabaseDAO


Constructor Summary
MyAppsDatabaseDAO()
           
 
Method Summary
 void delete(int nMyAppsId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 fr.paris.lutece.portal.service.image.ImageResource getIconResource(int nIdMyApps, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads the icon representing the favorite application
 fr.paris.lutece.util.ReferenceList getMyAppsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of my apps
 boolean hasIcon(int nIdApps, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if the Myapps has an icon or not
 void insert(MyAppsDatabase myApps, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 fr.paris.lutece.plugins.myapps.business.MyApps load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of the right from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get a new primary key
 java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsList(MyAppsDatabaseFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads all the myapps
 java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsListByFilter(MyAppsDatabaseFilter filter, boolean bIsAscSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads all the myapps belonging to a filter
 void store(MyAppsDatabase myApps, boolean bUpdateIcon, 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

MyAppsDatabaseDAO

public MyAppsDatabaseDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a new primary key

Specified by:
newPrimaryKey in interface IMyAppsDatabaseDAO
Parameters:
plugin - Plugin
Returns:
a new primary key

insert

public void insert(MyAppsDatabase myApps,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IMyAppsDatabaseDAO
Parameters:
myApps - instance of the MyApps object to insert
plugin - the Plugin

load

public fr.paris.lutece.plugins.myapps.business.MyApps load(int nId,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of the right from the table

Specified by:
load in interface IMyAppsDatabaseDAO
Parameters:
nId - The identifier of the myApps
plugin - the Plugin
Returns:
The instance of the myApps

delete

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

Specified by:
delete in interface IMyAppsDatabaseDAO
Parameters:
nMyAppsId - int identifier of the MyApps to delete
plugin - the Plugin

store

public void store(MyAppsDatabase myApps,
                  boolean bUpdateIcon,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IMyAppsDatabaseDAO
Parameters:
myApps - the reference of the MyApps
bUpdateIcon - true if the icon must also be updated, false otherwise
plugin - the Plugin

selectMyAppsList

public java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsList(MyAppsDatabaseFilter filter,
                                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads all the myapps

Specified by:
selectMyAppsList in interface IMyAppsDatabaseDAO
Parameters:
filter - the app filter
plugin - the Plugin
Returns:
the list which contains the myApps

selectMyAppsListByFilter

public java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsListByFilter(MyAppsDatabaseFilter filter,
                                                                                               boolean bIsAscSort,
                                                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads all the myapps belonging to a filter

Specified by:
selectMyAppsListByFilter in interface IMyAppsDatabaseDAO
Parameters:
filter - the app filter
bIsAscSort - true if it is sorted ascendly, false otherwise
plugin - the Plugin
Returns:
the list which contains the myApps

getIconResource

public fr.paris.lutece.portal.service.image.ImageResource getIconResource(int nIdMyApps,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads the icon representing the favorite application

Specified by:
getIconResource in interface IMyAppsDatabaseDAO
Parameters:
nIdMyApps - int identifier of the MyApps to fetch
plugin - the Plugin
Returns:
the image resource

getMyAppsList

public fr.paris.lutece.util.ReferenceList getMyAppsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of my apps

Specified by:
getMyAppsList in interface IMyAppsDatabaseDAO
Parameters:
plugin - Plugin
Returns:
a list of MyAppsDatabase

hasIcon

public boolean hasIcon(int nIdApps,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the Myapps has an icon or not

Specified by:
hasIcon in interface IMyAppsDatabaseDAO
Parameters:
nIdApps - the ID of the MyApp
plugin - Plugin
Returns:
true if it has an icon, false otherwise


Copyright © 2012 Mairie de Paris. All Rights Reserved.