Class UnitAssignmentHome


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

      • 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 java.util.List<UnitAssignment> findByResource​(int nIdResource,
                                                                    java.lang.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 java.util.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 java.util.List<java.lang.Integer> findIdResourceByFilter​(UnitAssignmentFilter filter)
        Finds id resource from filter.
        Parameters:
        filter - the filter
        Returns:
        the list of id resource
      • getListByFilter

        public static java.util.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,
                                                java.lang.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,
                                            java.lang.String strResourceType)

        Delete the units assignments associated to the specified resource.

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