fr.paris.lutece.plugins.extend.modules.actionhit.business
Class ActionHitDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.modules.actionhit.business.ActionHitDAO
All Implemented Interfaces:
IActionHitDAO

public class ActionHitDAO
extends Object
implements IActionHitDAO

DAO to manage ActionHit


Constructor Summary
ActionHitDAO()
           
 
Method Summary
 void create(ActionHit actionHit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an action hit
 void delete(int nIdActionHit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an action hit
 void deleteByResource(String strExtendableResourceType, String strIdExtendableResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete action hits associated with a given resource
 List<ActionHit> findActionHitsByAction(String strActionName, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of action hits associated to a given action and a given resource type
 List<ActionHit> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find every action hit
 List<ActionHit> findAllByResource(String strExtendableResourceType, String strIdExtendableResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of action hits associated with a given resource.
 ActionHit findByActionNameAndResource(String strActionName, String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get an action hit from its id
 void updateHit(ActionHit actionHit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update an action hit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionHitDAO

public ActionHitDAO()
Method Detail

create

public void create(ActionHit actionHit,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an action hit

Specified by:
create in interface IActionHitDAO
Parameters:
actionHit - Action hit to save
plugin - The plugin

findByActionNameAndResource

public ActionHit findByActionNameAndResource(String strActionName,
                                             String strIdExtendableResource,
                                             String strExtendableResourceType,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get an action hit from its id

Specified by:
findByActionNameAndResource in interface IActionHitDAO
Parameters:
strActionName - The name of the action to get
strIdExtendableResource - The id of the resource to get the action of
strExtendableResourceType - The type of the resource to get the action of
plugin - The plugin
Returns:
The action hit, or null if no action hit has the given name or is associated to the given resource

updateHit

public void updateHit(ActionHit actionHit,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update an action hit

Specified by:
updateHit in interface IActionHitDAO
Parameters:
actionHit - The action hit to update
plugin - The plugin

delete

public void delete(int nIdActionHit,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an action hit

Specified by:
delete in interface IActionHitDAO
Parameters:
nIdActionHit - The if of the action hit to delete
plugin - The plugin

deleteByResource

public void deleteByResource(String strExtendableResourceType,
                             String strIdExtendableResource,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface: IActionHitDAO
Delete action hits associated with a given resource

Specified by:
deleteByResource in interface IActionHitDAO
Parameters:
strExtendableResourceType - The type of the resource to remove hits of
strIdExtendableResource - The id of the resource to remove hits of
plugin - The plugin

findAll

public List<ActionHit> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find every action hit

Specified by:
findAll in interface IActionHitDAO
Parameters:
plugin - The plugin
Returns:
The list of action hits

findAllByResource

public List<ActionHit> findAllByResource(String strExtendableResourceType,
                                         String strIdExtendableResource,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of action hits associated with a given resource.

Specified by:
findAllByResource in interface IActionHitDAO
Parameters:
strExtendableResourceType - The resource type of hits
strIdExtendableResource - The id of the extendable resource to get hits of
plugin - The plugin
Returns:
The list of action hits

findActionHitsByAction

public List<ActionHit> findActionHitsByAction(String strActionName,
                                              String strExtendableResourceType,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of action hits associated to a given action and a given resource type

Specified by:
findActionHitsByAction in interface IActionHitDAO
Parameters:
strActionName - The name of the action to get the hits of
strExtendableResourceType - The resource type
plugin - The plugin
Returns:
The list of action hits, or an empty list if no actions was found


Copyright © 2013 Mairie de Paris. All Rights Reserved.