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

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

public final class PluginModelDAO
extends java.lang.Object
implements IPluginModelDAO

This class provides Data Access methods for PluginModel objects


Constructor Summary
PluginModelDAO()
           
 
Method Summary
 void delete(int nPluginModelId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(PluginModel pluginModel, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 PluginModel load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the pluginModel from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 boolean pluginExists(java.lang.String strPluginName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether the plugin exists
 int selectPluginModelByName(fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPluginName)
          Returns the identifier of the generated plugin
 java.util.Collection<PluginModel> selectPluginModelsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the pluginModels and returns them as a collection
 void store(PluginModel pluginModel, 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

PluginModelDAO

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

Specified by:
insert in interface IPluginModelDAO
Parameters:
pluginModel - instance of the PluginModel object to insert
plugin - The plugin

load

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

Specified by:
load in interface IPluginModelDAO
Parameters:
nId - The identifier of the pluginModel
plugin - The plugin
Returns:
the instance of the PluginModel

delete

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

Specified by:
delete in interface IPluginModelDAO
Parameters:
nPluginModelId - The identifier of the pluginModel
plugin - The plugin

store

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

Specified by:
store in interface IPluginModelDAO
Parameters:
pluginModel - The reference of the pluginModel
plugin - The plugin

selectPluginModelsList

public java.util.Collection<PluginModel> selectPluginModelsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the pluginModels and returns them as a collection

Specified by:
selectPluginModelsList in interface IPluginModelDAO
Parameters:
plugin - The plugin
Returns:
The Collection which contains the data of all the pluginModels

selectPluginModelByName

public int selectPluginModelByName(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                   java.lang.String strPluginName)
Returns the identifier of the generated plugin

Specified by:
selectPluginModelByName in interface IPluginModelDAO
Parameters:
plugin - The Plugin
strPluginName - The name of the generated plugin
Returns:
the identifier of the generated plugin

pluginExists

public boolean pluginExists(java.lang.String strPluginName,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether the plugin exists

Specified by:
pluginExists in interface IPluginModelDAO
Parameters:
strPluginName - The name given to the plugin
plugin - The plugin
Returns:
A boolean value telling whether a plugin with this name exists


Copyright © 2012 Mairie de Paris. All Rights Reserved.