Class UnitAssignmentHome
- java.lang.Object
-
- fr.paris.lutece.plugins.unittree.business.assignment.UnitAssignmentHome
-
public final class UnitAssignmentHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for UnitAssignment objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UnitAssignmentcreate(UnitAssignment unitAssignment)Creates a unit assignmentstatic voiddeactivate(UnitAssignment unitAssignment)Deactivates a unit assignmentstatic voiddeactivateByResource(int nIdResource, java.lang.String strResourceType)Deactivate the units assignments associated to the specified resource.static voiddeleteByResource(int nIdResource, java.lang.String strResourceType)Delete the units assignments associated to the specified resource.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}.static java.util.List<UnitAssignment>findByUnit(int nIdUnit)Finds the unit assignments associated to the specified unit.static java.util.List<java.lang.Integer>findIdResourceByFilter(UnitAssignmentFilter filter)Finds id resource from filter.
-
-
-
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 idstrResourceType- 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
-
deactivateByResource
public static void deactivateByResource(int nIdResource, java.lang.String strResourceType)Deactivate the units assignments associated to the specified resource.
- Parameters:
nIdResource- the resource idstrResourceType- 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 idstrResourceType- the resource type
-
-