Class UnitAssignmentDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.unittree.business.assignment.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.StringBEAN_NAME
-
Constructor Summary
Constructors Constructor Description UnitAssignmentDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeactivate(UnitAssignment unitAssignment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Deactivates a unit assignmentvoiddeactivateByResource(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Deactivate the unit assignments associated to the specified resourcevoiddeleteByResource(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Deletes the unit assignments associated to the specified resourcejava.util.List<UnitAssignment>getListByFilter(UnitAssignmentFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Loads the unit assignments from filter.voidinsert(UnitAssignment unitAssignment, fr.paris.lutece.portal.service.plugin.Plugin plugin)Inserts a new record in the table.UnitAssignmentloadCurrentAssignment(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 unitjava.util.List<java.lang.Integer>selectIdResourceByFilter(UnitAssignmentFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Finds id resource from filter.
-
-
-
Field Detail
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
-
-
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:
insertin interfaceIUnitAssignmentDAO- Parameters:
unitAssignment- the unit assignment to insertplugin- 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:
loadCurrentAssignmentin interfaceIUnitAssignmentDAO- Parameters:
nIdResource- The resource idstrResourceType- the resource typeplugin- 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:
deactivatein interfaceIUnitAssignmentDAO- Parameters:
unitAssignment- the unit assignment to deactivateplugin- 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:
selectByResourcein interfaceIUnitAssignmentDAO- Parameters:
nIdResource- the resource idstrResourceType- the resource typeplugin- 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:
selectByUnitin interfaceIUnitAssignmentDAO- Parameters:
nIdUnit- the unit idplugin- 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:
selectIdResourceByFilterin interfaceIUnitAssignmentDAO- Parameters:
filter- the filterplugin- 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:
getListByFilterin interfaceIUnitAssignmentDAO- Parameters:
filter- the filterplugin- 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:
deactivateByResourcein interfaceIUnitAssignmentDAO- Parameters:
nIdResource- The resource idstrResourceType- The resource typeplugin- The plugin
-
deleteByResource
public void deleteByResource(int nIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Description copied from interface:IUnitAssignmentDAODeletes the unit assignments associated to the specified resource- Specified by:
deleteByResourcein interfaceIUnitAssignmentDAO- Parameters:
nIdResource- The resource idstrResourceType- The resource typeplugin- The plugin
-
-