Class UnitAssignmentDAO

java.lang.Object
fr.paris.lutece.plugins.unittree.business.assignment.UnitAssignmentDAO
All Implemented Interfaces:
IUnitAssignmentDAO

@ApplicationScoped public class UnitAssignmentDAO extends Object implements IUnitAssignmentDAO
This class provides Data Access methods for UnitAssignment objects
  • Field Details

  • Constructor Details

    • UnitAssignmentDAO

      public UnitAssignmentDAO()
  • Method Details

    • 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, 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 List<UnitAssignment> selectByResource(int nIdResource, 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 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 List<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 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, 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, 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