Class EntryHome


  • public final class EntryHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Entry objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Entry copy​(Entry entry)
      Copy of an instance of Entry
      static int create​(Entry entry)
      Creation of an instance of Entry
      static void decrementOrderByOne​(int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)
      Decrements the order of all the entries (conditional questions) after the one which will be removed
      static Entry findByOrderAndIdFieldAndIdResource​(int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)
      Finds the entry (conditional question) with a given order, idDependField, id resource and resource type
      static Entry findByPrimaryKey​(int nKey)
      Returns an instance of a Entry whose identifier is specified in parameter
      static java.util.List<Entry> findByPrimaryKeyList​(java.util.List<java.lang.Integer> idList)
      Returns a list of a Entry whose identifier is specified in parameter
      static java.util.List<Entry> findEntriesWithoutParent​(int nIdResource, java.lang.String strResourceType)
      Finds all the entries without any parent associated with a given resource
      static java.util.Map<java.lang.Integer,​java.lang.String> findEntryByForm​(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm)  
      static java.util.List<Entry> getEntryList​(EntryFilter filter)
      Load the data of all the entry who verify the filter and returns them in a list
      static java.lang.String getEntryValueByIdResponse​(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse)  
      static int getNumberEntryByFilter​(EntryFilter filter)
      Return the number of entry who verify the filter
      static void remove​(int nIdEntry)
      Remove the entry whose identifier is specified in parameter
      static void update​(Entry entry)
      Update of the entry which is specified in parameter
      • Methods inherited from class java.lang.Object

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

      • create

        public static int create​(Entry entry)
        Creation of an instance of Entry
        Parameters:
        entry - The instance of the Entry which contains the informations to store
        Returns:
        The primary key of the new entry.
      • copy

        public static Entry copy​(Entry entry)
        Copy of an instance of Entry
        Parameters:
        entry - The instance of the Entry who must copy
        Returns:
        the copied Entry
      • update

        public static void update​(Entry entry)
        Update of the entry which is specified in parameter
        Parameters:
        entry - The instance of the Entry which contains the informations to update
      • remove

        public static void remove​(int nIdEntry)
        Remove the entry whose identifier is specified in parameter
        Parameters:
        nIdEntry - The entry Id
      • findByPrimaryKey

        public static Entry findByPrimaryKey​(int nKey)
        Returns an instance of a Entry whose identifier is specified in parameter
        Parameters:
        nKey - The entry primary key
        Returns:
        an instance of Entry
      • findByPrimaryKeyList

        public static java.util.List<Entry> findByPrimaryKeyList​(java.util.List<java.lang.Integer> idList)
        Returns a list of a Entry whose identifier is specified in parameter
        Parameters:
        idList - The primary keys
        Returns:
        an instance of Entry
      • getEntryList

        public static java.util.List<Entry> getEntryList​(EntryFilter filter)
        Load the data of all the entry who verify the filter and returns them in a list
        Parameters:
        filter - the filter
        Returns:
        the list of entry
      • getNumberEntryByFilter

        public static int getNumberEntryByFilter​(EntryFilter filter)
        Return the number of entry who verify the filter
        Parameters:
        filter - the filter
        Returns:
        the number of entry who verify the filter
      • findEntriesWithoutParent

        public static java.util.List<Entry> findEntriesWithoutParent​(int nIdResource,
                                                                     java.lang.String strResourceType)
        Finds all the entries without any parent associated with a given resource
        Parameters:
        nIdResource - the id of the resource
        strResourceType - The resource type
        Returns:
        the list of all the entries without parent
      • findByOrderAndIdFieldAndIdResource

        public static Entry findByOrderAndIdFieldAndIdResource​(int nOrder,
                                                               int nIdField,
                                                               int nIdResource,
                                                               java.lang.String strResourceType)
        Finds the entry (conditional question) with a given order, idDependField, id resource and resource type
        Parameters:
        nOrder - the order
        nIdField - the id of the field
        nIdResource - the id of the resource
        strResourceType - The resource type of the entry to get
        Returns:
        the list of all the entries without parent
      • decrementOrderByOne

        public static void decrementOrderByOne​(int nOrder,
                                               int nIdField,
                                               int nIdResource,
                                               java.lang.String strResourceType)
        Decrements the order of all the entries (conditional questions) after the one which will be removed
        Parameters:
        nOrder - the order of the entry which will be removed
        nIdField - the id of the field
        nIdResource - the id of the resource
        strResourceType - The resource type
      • findEntryByForm

        public static java.util.Map<java.lang.Integer,​java.lang.String> findEntryByForm​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                                              int nIdForm)
        Parameters:
        plugin - the plugin
        nIdForm - id form
        Returns:
        list id entry with their titles
      • getEntryValueByIdResponse

        public static java.lang.String getEntryValueByIdResponse​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                 int nIdEntry,
                                                                 int nIdResponse)
        Parameters:
        plugin - the plugin
        nIdEntry - id entry
        nIdResponse - id entry response
        Returns:
        entry value