Class UnitAssignmentDAO

  • All Implemented Interfaces:
    IUnitAssignmentDAO

    public class UnitAssignmentDAO
    extends java.lang.Object
    implements IUnitAssignmentDAO
    This class provides Data Access methods for UnitAssignment objects
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEAN_NAME  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deactivate​(UnitAssignment unitAssignment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Deactivates a unit assignment
      void deactivateByResource​(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Deactivate the unit assignments associated to the specified resource
      void deleteByResource​(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Deletes the unit assignments associated to the specified resource
      java.util.List<UnitAssignment> getListByFilter​(UnitAssignmentFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Loads the unit assignments from filter.
      void insert​(UnitAssignment unitAssignment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Inserts a new record in the table.
      UnitAssignment loadCurrentAssignment​(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Loads the current unit assignment for the specified couple {resource id, resource type}
      java.util.List<UnitAssignment> selectByResource​(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Loads the unit assignments associated to the specified couple {resource id, resource type}
      java.util.List<UnitAssignment> selectByUnit​(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Loads the unit assignments associated to the specified unit
      java.util.List<java.lang.Integer> selectIdResourceByFilter​(UnitAssignmentFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Finds id resource from filter.
      • Methods inherited from class java.lang.Object

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

      • UnitAssignmentDAO

        public UnitAssignmentDAO()
    • Method Detail

      • insert

        public void insert​(UnitAssignment unitAssignment,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Inserts a new record in the table.
        Specified by:
        insert in interface IUnitAssignmentDAO
        Parameters:
        unitAssignment - the unit assignment to insert
        plugin - the Plugin
      • loadCurrentAssignment

        public UnitAssignment loadCurrentAssignment​(int nIdResource,
                                                    java.lang.String strResourceType,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Loads the current unit assignment for the specified couple {resource id, resource type}
        Specified by:
        loadCurrentAssignment in interface IUnitAssignmentDAO
        Parameters:
        nIdResource - The resource id
        strResourceType - the resource type
        plugin - the Plugin
        Returns:
        The current unit assignment
      • deactivate

        public void deactivate​(UnitAssignment unitAssignment,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Deactivates a unit assignment
        Specified by:
        deactivate in interface IUnitAssignmentDAO
        Parameters:
        unitAssignment - the unit assignment to deactivate
        plugin - the Plugin
      • selectByResource

        public java.util.List<UnitAssignment> selectByResource​(int nIdResource,
                                                               java.lang.String strResourceType,
                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Loads the unit assignments associated to the specified couple {resource id, resource type}
        Specified by:
        selectByResource in interface IUnitAssignmentDAO
        Parameters:
        nIdResource - the resource id
        strResourceType - the resource type
        plugin - the plugin
        Returns:
        the list of unit assignments
      • selectByUnit

        public java.util.List<UnitAssignment> selectByUnit​(int nIdUnit,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Loads the unit assignments associated to the specified unit
        Specified by:
        selectByUnit in interface IUnitAssignmentDAO
        Parameters:
        nIdUnit - the unit id
        plugin - the plugin
        Returns:
        the list of unit assignments
      • selectIdResourceByFilter

        public java.util.List<java.lang.Integer> selectIdResourceByFilter​(UnitAssignmentFilter filter,
                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Finds id resource from filter.
        Specified by:
        selectIdResourceByFilter in interface IUnitAssignmentDAO
        Parameters:
        filter - the filter
        plugin - the plugin
        Returns:
        the list of id resource
      • getListByFilter

        public java.util.List<UnitAssignment> getListByFilter​(UnitAssignmentFilter filter,
                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Loads the unit assignments from filter.
        Specified by:
        getListByFilter in interface IUnitAssignmentDAO
        Parameters:
        filter - the filter
        plugin - the plugin
        Returns:
        the list of unit assignments
      • deactivateByResource

        public void deactivateByResource​(int nIdResource,
                                         java.lang.String strResourceType,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Deactivate the unit assignments associated to the specified resource
        Specified by:
        deactivateByResource in interface IUnitAssignmentDAO
        Parameters:
        nIdResource - The resource id
        strResourceType - The resource type
        plugin - The plugin
      • deleteByResource

        public void deleteByResource​(int nIdResource,
                                     java.lang.String strResourceType,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUnitAssignmentDAO
        Deletes the unit assignments associated to the specified resource
        Specified by:
        deleteByResource in interface IUnitAssignmentDAO
        Parameters:
        nIdResource - The resource id
        strResourceType - The resource type
        plugin - The plugin