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

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

public final class PluginFeatureDAO
extends java.lang.Object
implements IPluginFeatureDAO

This class provides Data Access methods for PluginFeature objects


Constructor Summary
PluginFeatureDAO()
           
 
Method Summary
 void delete(int nPluginFeatureId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteAllPluginFeaturesByPluginId(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes all the features attached to a plugin
 void deleteDependency(int nPluginFeatureId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete the dependency
 void insert(PluginFeature pluginFeature, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertDependency(int nIdPlugin, int nIdPluginFeature, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Inserts the dependency between the plugin and the admin feature
 PluginFeature load(int nIdFeature, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the pluginFeature from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.Collection<PluginFeature> selectFeatureByPlugin(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the pluginFeatures and returns them as a collection
 fr.paris.lutece.util.ReferenceList selectFeatureByPluginCombo(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of features which are available for specific plugins
 void store(PluginFeature pluginFeature, 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

PluginFeatureDAO

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

Specified by:
insert in interface IPluginFeatureDAO
Parameters:
pluginFeature - instance of the PluginFeature object to insert
plugin - The plugin

insertDependency

public void insertDependency(int nIdPlugin,
                             int nIdPluginFeature,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Inserts the dependency between the plugin and the admin feature

Specified by:
insertDependency in interface IPluginFeatureDAO
Parameters:
nIdPlugin - The identifier of the plugin
nIdPluginFeature - The identifier of the pluginFeature
plugin - The plugin

load

public PluginFeature load(int nIdFeature,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the pluginFeature from the table

Specified by:
load in interface IPluginFeatureDAO
Parameters:
nIdFeature - The identifier of the pluginFeature
plugin - The plugin
Returns:
the instance of the PluginFeature

delete

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

Specified by:
delete in interface IPluginFeatureDAO
Parameters:
nPluginFeatureId - The identifier of the pluginFeature
plugin - The plugin

deleteDependency

public void deleteDependency(int nPluginFeatureId,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete the dependency

Parameters:
nPluginFeatureId - The identifier of the pluginFeature
plugin - The plugin

store

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

Specified by:
store in interface IPluginFeatureDAO
Parameters:
pluginFeature - The reference of the pluginFeature
plugin - The plugin

selectFeatureByPlugin

public java.util.Collection<PluginFeature> selectFeatureByPlugin(int nPluginId,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the pluginFeatures and returns them as a collection

Specified by:
selectFeatureByPlugin in interface IPluginFeatureDAO
Parameters:
nPluginId - The identifier of the plugin
plugin - The plugin
Returns:
The Collection which contains the data of all the pluginFeatures

selectFeatureByPluginCombo

public fr.paris.lutece.util.ReferenceList selectFeatureByPluginCombo(int nIdPlugin,
                                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of features which are available for specific plugins

Specified by:
selectFeatureByPluginCombo in interface IPluginFeatureDAO
Parameters:
nIdPlugin - The id of the plugin
plugin - The plugin
Returns:
The Collection of the features for the plugin

deleteAllPluginFeaturesByPluginId

public void deleteAllPluginFeaturesByPluginId(int nIdPlugin,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes all the features attached to a plugin

Specified by:
deleteAllPluginFeaturesByPluginId in interface IPluginFeatureDAO
Parameters:
nIdPlugin - The identifier of the plugin
plugin - The plugin


Copyright © 2012 Mairie de Paris. All Rights Reserved.