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

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

public final class ResourceKeyDAO
extends Object
implements IResourceKeyDAO

This class provides Data Access methods for ResourceKey objects


Constructor Summary
ResourceKeyDAO()
           
 
Method Summary
 void deleteAllByPlugin(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete all records from the table
 void deleteByPlugin(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete all resources related to plugin record from the table
 void insert(ResourceKey resourceKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 Collection<ResourceKey> selectResourceKeysList(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns all the resource keys related to a generated plugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceKeyDAO

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

Specified by:
insert in interface IResourceKeyDAO
Parameters:
resourceKey - instance of the ResourceKey object to insert
plugin - The plugin

deleteAllByPlugin

public void deleteAllByPlugin(int nPluginId,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete all records from the table

Parameters:
nPluginId - The identifier of the resourceKey
plugin - The plugin

selectResourceKeysList

public Collection<ResourceKey> selectResourceKeysList(int nPluginId,
                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns all the resource keys related to a generated plugin

Specified by:
selectResourceKeysList in interface IResourceKeyDAO
Parameters:
nPluginId - The identifier of the plugin
plugin - The plugin
Returns:
A collection of resource keys

deleteByPlugin

public void deleteByPlugin(int nPluginId,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete all resources related to plugin record from the table

Specified by:
deleteByPlugin in interface IResourceKeyDAO
Parameters:
nPluginId - The identifier of the plugin
plugin - The plugin


Copyright © 2013 Mairie de Paris. All Rights Reserved.