Class HitHome


  • public class HitHome
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void create​(Hit hit)
      Creates the a hit extender.
      static java.util.Optional<Hit> findByParameters​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      Find by id extender.
      static java.util.Optional<Hit> findByPrimaryKey​(int nIdHit)
      Find.
      static java.util.List<Hit> findByResourceList​(java.util.List<java.lang.String> listIdExtendableResource, java.lang.String strExtendableResourceType)
      Find by list id extendable resource.
      static java.util.List<java.lang.Integer> findIdMostHitedResources​(java.lang.String strExtendableResourceType, int nItemsOffset, int nMaxItemsNumber)
      Get the ids of resources ordered by their number of hits
      static void remove​(int nIdExtender)
      Removes a hit extender.
      static void removeByResource​(java.lang.String strIdResource, java.lang.String strResourceType)
      Removes a hit extender by id resource and resource type.
      static void update​(Hit hit)
      Update a hit extender.
      • Methods inherited from class java.lang.Object

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

      • create

        public static void create​(Hit hit)
        Creates the a hit extender.
        Parameters:
        hit - the hit
      • update

        public static void update​(Hit hit)
        Update a hit extender.
        Parameters:
        hit - the hit
      • remove

        public static void remove​(int nIdExtender)
        Removes a hit extender.
        Parameters:
        nIdHit - the n id hit
      • removeByResource

        public static void removeByResource​(java.lang.String strIdResource,
                                            java.lang.String strResourceType)
        Removes a hit extender by id resource and resource type.
        Parameters:
        strIdResource - The id of the resource to remove
        strResourceType - The type of the resource to remove
      • findByPrimaryKey

        public static java.util.Optional<Hit> findByPrimaryKey​(int nIdHit)
        Find.
        Parameters:
        nIdExtender - the n id extender
        Returns:
        the Optional
      • findByParameters

        public static java.util.Optional<Hit> findByParameters​(java.lang.String strIdExtendableResource,
                                                               java.lang.String strExtendableResourceType)
        Find by id extender.
        Parameters:
        strIdExtendableResource - the str id extendable resource
        strExtendableResourceType - the str extendable resource type
        Returns:
        the Optional
      • findIdMostHitedResources

        public static java.util.List<java.lang.Integer> findIdMostHitedResources​(java.lang.String strExtendableResourceType,
                                                                                 int nItemsOffset,
                                                                                 int nMaxItemsNumber)
        Get the ids of resources ordered by their number of hits
        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
        Returns:
        The list of ids of resources ordered by the number hits
      • findByResourceList

        public static java.util.List<Hit> findByResourceList​(java.util.List<java.lang.String> listIdExtendableResource,
                                                             java.lang.String strExtendableResourceType)
        Find by list id extendable resource.
        Parameters:
        listIdExtendableResource - the list of str id extendable resource
        strExtendableResourceType - the str extendable resource type
        Returns:
        the hit list