|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.unittree.business.unit.UnitDAO
public class UnitDAO
UnitDAO
Constructor Summary | |
---|---|
UnitDAO()
|
Method Summary | |
---|---|
void |
addUserToUnit(int nIdUnit,
int nIdUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add an user to an unit |
List<Unit> |
findBySectorId(int nIdSector,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return all the Unit of the Sector |
List<Unit> |
getUnitWithNoChildren(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return all the Unit with no children (level 0) |
boolean |
hasSubUnits(int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the given id unit has sub units or not |
int |
insert(Unit unit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new unit |
boolean |
isUserInUnit(int nIdUser,
int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the user is in the unit |
Unit |
load(int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the unit |
int |
newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get new primary key |
void |
remove(int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a unit |
void |
removeUserFromUnit(int nIdUser,
int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a given user from the unit |
void |
removeUsersFromUnit(int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove users from a given id unit |
List<Unit> |
selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select all units |
List<Integer> |
selectAllIdsUser(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select all ids user |
List<Unit> |
selectByFilter(UnitFilter cmFilter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the units by filter |
List<Unit> |
selectByIdUser(int nIdUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load an unit by id user |
List<Integer> |
selectIdsUser(int nIdUnit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the ids user from a given id unit |
void |
update(Unit unit,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a unit |
void |
updateParent(int nIdUnitToMove,
int nIdNewParent,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the parent of a unit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnitDAO()
Method Detail |
---|
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
newPrimaryKey
in interface IUnitDAO
plugin
- the plugin
public int insert(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert
in interface IUnitDAO
unit
- the unitplugin
- the plugin
public Unit load(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load
in interface IUnitDAO
nIdUnit
- the id unitplugin
- the plugin
Unit
public List<Unit> selectByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectByIdUser
in interface IUnitDAO
nIdUser
- the id userplugin
- the plugin
Unit
public List<Unit> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAll
in interface IUnitDAO
plugin
- the plugin
Unit
public void remove(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
remove
in interface IUnitDAO
nIdUnit
- the id unitplugin
- the pluginpublic boolean hasSubUnits(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
hasSubUnits
in interface IUnitDAO
nIdUnit
- the id unitplugin
- the plugin
public void removeUserFromUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
removeUserFromUnit
in interface IUnitDAO
nIdUser
- the id usernIdUnit
- The id of the unitplugin
- the pluginpublic void removeUsersFromUnit(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
removeUsersFromUnit
in interface IUnitDAO
nIdUnit
- the id unitplugin
- the pluginpublic void update(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
update
in interface IUnitDAO
unit
- the unitplugin
- the pluginpublic List<Unit> selectByFilter(UnitFilter cmFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectByFilter
in interface IUnitDAO
cmFilter
- the filterplugin
- the plugin
Unit
public List<Integer> selectAllIdsUser(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllIdsUser
in interface IUnitDAO
plugin
- the plugin
public List<Integer> selectIdsUser(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectIdsUser
in interface IUnitDAO
nIdUnit
- the id unitplugin
- the plugin
public void addUserToUnit(int nIdUnit, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
addUserToUnit
in interface IUnitDAO
nIdUnit
- the id unitnIdUser
- the id userplugin
- the pluginpublic boolean isUserInUnit(int nIdUser, int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
isUserInUnit
in interface IUnitDAO
nIdUser
- the id usernIdUnit
- The id of the unitplugin
- the plugin
public List<Unit> findBySectorId(int nIdSector, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findBySectorId
in interface IUnitDAO
nIdSector
- id sectorplugin
- the plugin
public List<Unit> getUnitWithNoChildren(fr.paris.lutece.portal.service.plugin.Plugin plugin)
getUnitWithNoChildren
in interface IUnitDAO
plugin
- the plugin
public void updateParent(int nIdUnitToMove, int nIdNewParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateParent
in interface IUnitDAO
nIdUnitToMove
- The id of the unit to change the parent of.nIdNewParent
- The id of the new parent of the unit.plugin
- The plugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |