java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.EntryDAO
All Implemented Interfaces:
IEntryDAO

@ApplicationScoped public class EntryDAO extends Object implements IEntryDAO
This class provides Data Access methods for Entry objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decrementOrderByOne(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, String strResourceType)
    Decrements the order of all the entries (conditional questions) after the one which will be removed
    void
    delete(int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    findByOrderAndIdFieldAndIdResource(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, String strResourceType)
    Finds the entry (conditional question) with a given order, idDependField and the id of the resource
    findEntriesWithoutParent(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdResource, String strResourceType)
    Finds all the entries without any parent associated to a given resource
    findEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm)
    getEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse)
    int
    insert(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of the entry from the table
    loadMultiple(List<Integer> idList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of the entry from the table
    selectEntryListByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the entry who verify the filter and returns them in a list
    int
    selectNumberEntryByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Return the number of entry who verify the filter
    void
    store(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the entry in the table

    Methods inherited from class java.lang.Object

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

    • EntryDAO

      public EntryDAO()
  • Method Details

    • insert

      public int insert(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insert in interface IEntryDAO
      Parameters:
      entry - instance of the Entry object to insert
      plugin - the plugin
      Returns:
      the id of the new entry
    • load

      public Entry load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of the entry from the table
      Specified by:
      load in interface IEntryDAO
      Parameters:
      nId - The identifier of the entry
      plugin - the plugin
      Returns:
      the instance of the Entry
    • loadMultiple

      public List<Entry> loadMultiple(List<Integer> idList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IEntryDAO
      Load the data of the entry from the table
      Specified by:
      loadMultiple in interface IEntryDAO
      Parameters:
      idList - The identifiers of the entries
      plugin - the plugin
      Returns:
      the instance of the Entry
    • delete

      public void delete(int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface IEntryDAO
      Parameters:
      nIdEntry - The identifier of the entry
      plugin - the plugin
    • store

      public void store(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the entry in the table
      Specified by:
      store in interface IEntryDAO
      Parameters:
      entry - instance of the Entry object to update
      plugin - the plugin
    • selectEntryListByFilter

      public List<Entry> selectEntryListByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the entry who verify the filter and returns them in a list
      Specified by:
      selectEntryListByFilter in interface IEntryDAO
      Parameters:
      filter - the filter
      plugin - the plugin
      Returns:
      the list of entry
    • selectNumberEntryByFilter

      public int selectNumberEntryByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the number of entry who verify the filter
      Specified by:
      selectNumberEntryByFilter in interface IEntryDAO
      Parameters:
      filter - the filter
      plugin - the plugin
      Returns:
      the number of entry who verify the filter
    • findEntriesWithoutParent

      public List<Entry> findEntriesWithoutParent(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdResource, String strResourceType)
      Finds all the entries without any parent associated to a given resource
      Specified by:
      findEntriesWithoutParent in interface IEntryDAO
      Parameters:
      plugin - the plugin
      nIdResource - the id of the resource
      strResourceType - the resource type
      Returns:
      the list of all the entries without parent
    • findByOrderAndIdFieldAndIdResource

      public Entry findByOrderAndIdFieldAndIdResource(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, String strResourceType)
      Finds the entry (conditional question) with a given order, idDependField and the id of the resource
      Specified by:
      findByOrderAndIdFieldAndIdResource in interface IEntryDAO
      Parameters:
      plugin - the plugin
      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 void decrementOrderByOne(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, String strResourceType)
      Decrements the order of all the entries (conditional questions) after the one which will be removed
      Specified by:
      decrementOrderByOne in interface IEntryDAO
      Parameters:
      plugin - The plugin
      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 Map<Integer,String> findEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm)
      Specified by:
      findEntryByForm in interface IEntryDAO
      Parameters:
      plugin - The plugin
      nIdForm - if form
      Returns:
    • getEntryValueByIdResponse

      public String getEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse)
      Specified by:
      getEntryValueByIdResponse in interface IEntryDAO
      Parameters:
      plugin - the plugin
      nIdEntry - id entry
      nIdResponse - id entry response
      Returns:
      entry value