Class UnitAssignmentHome

java.lang.Object
fr.paris.lutece.plugins.unittree.business.assignment.UnitAssignmentHome

public final class UnitAssignmentHome extends Object
This class provides instances management methods (create, find, ...) for UnitAssignment objects
  • Method Details

    • create

      public static UnitAssignment create(UnitAssignment unitAssignment)
      Creates a unit assignment
      Parameters:
      unitAssignment - The unit assignment to create
      Returns:
      The unit assignment which has been created
    • deactivate

      public static void deactivate(UnitAssignment unitAssignment)
      Deactivates a unit assignment
      Parameters:
      unitAssignment - The unit assignment to deactivate
    • findByResource

      public static List<UnitAssignment> findByResource(int nIdResource, String strResourceType)

      Finds the unit assignments associated to the specified couple {resource id, resource type}.

      The result list contains active and inactive unit assignments.

      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      Returns:
      the list of unit assignments
    • findByUnit

      public static List<UnitAssignment> findByUnit(int nIdUnit)

      Finds the unit assignments associated to the specified unit.

      The result list contains active and inactive unit assignments.

      Parameters:
      nIdUnit - the unit id
      Returns:
      the list of unit assignments
    • findIdResourceByFilter

      public static List<Integer> findIdResourceByFilter(UnitAssignmentFilter filter)
      Finds id resource from filter.
      Parameters:
      filter - the filter
      Returns:
      the list of id resource
    • getListByFilter

      public static List<UnitAssignment> getListByFilter(UnitAssignmentFilter filter)
      Finds unit assignments from filter.
      Parameters:
      filter - the filter
      Returns:
      the list of unit assignments
    • deactivateByResource

      public static void deactivateByResource(int nIdResource, String strResourceType)

      Deactivate the units assignments associated to the specified resource.

      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
    • deleteByResource

      public static void deleteByResource(int nIdResource, String strResourceType)

      Delete the units assignments associated to the specified resource.

      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type