Interface IUnitDAO
-
- All Known Implementing Classes:
UnitDAO
public interface IUnitDAO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUserToUnit(int nIdUnit, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add an user to an unitUnitfindByCode(java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the unit by codejava.util.List<Unit>getSubUnits(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Retrieve list of direct children unitsjava.util.List<Unit>getUnitWithNoChildren(fr.paris.lutece.portal.service.plugin.Plugin plugin)Return all the Unit with no children (level 0)booleanhasSubUnits(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the given id unit has sub units or notintinsert(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new unitbooleanisUserInUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the user is in the unitUnitload(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the unitintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Get new primary keyvoidremove(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a unitvoidremoveUserFromUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a given user from the unitvoidremoveUsersFromUnit(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove users from a given id unitjava.util.List<Unit>selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)Select all unitsjava.util.List<java.lang.Integer>selectAllIdsUser(fr.paris.lutece.portal.service.plugin.Plugin plugin)Select all ids userjava.util.List<Unit>selectByFilter(UnitFilter uFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select the units by filterjava.util.List<Unit>selectByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load an unit by id userjava.util.List<java.lang.Integer>selectIdsUser(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select the ids user from a given id unitvoidupdate(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update a unitvoidupdateParent(int nIdUnitToMove, int nIdNewParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the parent of a unit
-
-
-
Method Detail
-
newPrimaryKey
int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get new primary key- Parameters:
plugin- the plugin- Returns:
- a new primary key
-
load
Unit load(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the unit- Parameters:
nIdUnit- the id unitplugin- the plugin- Returns:
- an instance of
Unit
-
findByCode
Unit findByCode(java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the unit by code- Parameters:
strCode- the unit codeplugin- the plugin- Returns:
- an instance of
Unit
-
selectByIdUser
java.util.List<Unit> selectByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load an unit by id user- Parameters:
nIdUser- the id userplugin- the plugin- Returns:
- a list of
Unit
-
selectAll
java.util.List<Unit> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select all units- Parameters:
plugin- the plugin- Returns:
- a list of
Unit
-
selectByFilter
java.util.List<Unit> selectByFilter(UnitFilter uFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the units by filter- Parameters:
uFilter- the filterplugin- the plugin- Returns:
- a list of
Unit
-
selectAllIdsUser
java.util.List<java.lang.Integer> selectAllIdsUser(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select all ids user- Parameters:
plugin- the plugin- Returns:
- a list of ids user
-
selectIdsUser
java.util.List<java.lang.Integer> selectIdsUser(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select the ids user from a given id unit- Parameters:
nIdUnit- the id unitplugin- the plugin- Returns:
- a list of ids user
-
insert
int insert(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new unit- Parameters:
unit- the unitplugin- the plugin- Returns:
- the new primary key
-
hasSubUnits
boolean hasSubUnits(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the given id unit has sub units or not- Parameters:
nIdUnit- the id unitplugin- the plugin- Returns:
- true if the unit has sub units, false otherwise
-
getSubUnits
java.util.List<Unit> getSubUnits(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Retrieve list of direct children units- Parameters:
nIdUnit- the id unitplugin- the plugin- Returns:
- List of children units
-
remove
void remove(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a unit- Parameters:
nIdUnit- the id unitplugin- the plugin
-
update
void update(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a unit- Parameters:
unit- the unitplugin- the plugin
-
addUserToUnit
void addUserToUnit(int nIdUnit, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add an user to an unit- Parameters:
nIdUnit- the id unitnIdUser- the id userplugin- the plugin
-
isUserInUnit
boolean isUserInUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the user is in the unit- Parameters:
nIdUser- the id usernIdUnit- The id of the unitplugin- the plugin- Returns:
- true if the user is in the unit, false otherwise
-
removeUserFromUnit
void removeUserFromUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a given user from the unit- Parameters:
nIdUser- the id usernIdUnit- The id of the unitplugin- the plugin
-
removeUsersFromUnit
void removeUsersFromUnit(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove users from a given id unit- Parameters:
nIdUnit- the id unitplugin- the plugin
-
getUnitWithNoChildren
java.util.List<Unit> getUnitWithNoChildren(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return all the Unit with no children (level 0)- Parameters:
plugin- the plugin- Returns:
- all the Unit with no children (level 0)
-
updateParent
void updateParent(int nIdUnitToMove, int nIdNewParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the parent of a unit- Parameters:
nIdUnitToMove- The id of the unit to change the parent of.nIdNewParent- The id of the new parent of the unit.plugin- The plugin
-
-