Class HitDAO

  • All Implemented Interfaces:
    IHitDAO

    public class HitDAO
    extends java.lang.Object
    implements IHitDAO
    InteractionHitDAO
    • Constructor Summary

      Constructors 
      Constructor Description
      HitDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdHit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete.
      void deleteByResource​(java.lang.String strIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete hits of a given resource
      java.util.List<Hit> findByResourceList​(java.util.List<java.lang.String> listIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get list of Hit by ids resources.
      java.util.List<java.lang.Integer> findIdMostHitedResources​(java.lang.String strExtendableResourceType, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the ids of resources ordered by their number of hits
      void insert​(Hit hit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert.
      Hit load​(int nIdHit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load.
      Hit loadByParameters​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load by id extender.
      void store​(Hit hit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HitDAO

        public HitDAO()
    • Method Detail

      • insert

        public void insert​(Hit hit,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert.
        Specified by:
        insert in interface IHitDAO
        Parameters:
        hit - the hit
        plugin - the plugin
      • store

        public void store​(Hit hit,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update.
        Specified by:
        store in interface IHitDAO
        Parameters:
        hit - the hit
        plugin - the plugin
      • delete

        public void delete​(int nIdHit,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete.
        Specified by:
        delete in interface IHitDAO
        Parameters:
        nIdHit - the n id hit
        plugin - the plugin
      • deleteByResource

        public void deleteByResource​(java.lang.String strIdResource,
                                     java.lang.String strResourceType,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete hits of a given resource
        Specified by:
        deleteByResource in interface IHitDAO
        Parameters:
        strIdResource - the id of the resource, or a wildcare to remove all
        strResourceType - The resource type to delete
        plugin - the plugin
      • load

        public Hit load​(int nIdHit,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load.
        Specified by:
        load in interface IHitDAO
        Parameters:
        nIdHit - the n id hit
        plugin - the plugin
        Returns:
        the hit
      • loadByParameters

        public Hit loadByParameters​(java.lang.String strIdExtendableResource,
                                    java.lang.String strExtendableResourceType,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load by id extender.
        Specified by:
        loadByParameters in interface IHitDAO
        Parameters:
        strIdExtendableResource - the str id extendable resource
        strExtendableResourceType - the str extendable resource type
        plugin - the plugin
        Returns:
        the hit
      • findIdMostHitedResources

        public java.util.List<java.lang.Integer> findIdMostHitedResources​(java.lang.String strExtendableResourceType,
                                                                          int nItemsOffset,
                                                                          int nMaxItemsNumber,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the ids of resources ordered by their number of hits
        Specified by:
        findIdMostHitedResources in interface IHitDAO
        Parameters:
        strExtendableResourceType - The type of resources to consider
        nItemsOffset - The offset of the items to get, or 0 to get items from the first one
        nMaxItemsNumber - The maximum number of items to return, or 0 to get every items
        plugin - the plugin
        Returns:
        The list of ids of resources ordered by the number hits
      • findByResourceList

        public java.util.List<Hit> findByResourceList​(java.util.List<java.lang.String> listIdExtendableResource,
                                                      java.lang.String strExtendableResourceType,
                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IHitDAO
        Get list of Hit by ids resources.
        Specified by:
        findByResourceList in interface IHitDAO
        Parameters:
        listIdExtendableResource - the list of str id extendable resource
        strExtendableResourceType - the str extendable resource type
        plugin - the plugin
        Returns:
        the hit list