fr.paris.lutece.plugins.unittree.business.unit
Interface IUnitDAO

All Known Implementing Classes:
UnitDAO

public interface IUnitDAO


Method Summary
 void addUserToUnit(int nIdUnit, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add an user to an unit
 java.util.List<Unit> findBySectorId(long lIdSector)
          Return all the Unit of the Sector
 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, 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, 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
 java.util.List<Unit> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select all units
 java.util.List<java.lang.Integer> selectAllIdsUser(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select all ids user
 java.util.List<Unit> selectByFilter(UnitFilter uFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the units by filter
 Unit selectByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load an unit by id user
 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
 void update(Unit unit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update 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 unit
plugin - the plugin
Returns:
an instance of Unit

selectByIdUser

Unit selectByIdUser(int nIdUser,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load an unit by id user

Parameters:
nIdUser - the id user
plugin - the plugin
Returns:
an instance 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 filter
plugin - 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 unit
plugin - 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 unit
plugin - 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 unit
plugin - the plugin
Returns:
true if the unit has sub units, false otherwise

remove

void remove(int nIdUnit,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a unit

Parameters:
nIdUnit - the id unit
plugin - the plugin

update

void update(Unit unit,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a unit

Parameters:
unit - the unit
plugin - 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 unit
nIdUser - the id user
plugin - the plugin

isUserInUnit

boolean isUserInUnit(int nIdUser,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the user is in the unit

Parameters:
nIdUser - the id user
plugin - the plugin
Returns:
true if the user is in the unit, false otherwise

removeUserFromUnit

void removeUserFromUnit(int nIdUser,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a given user from the unit

Parameters:
nIdUser - the id user
plugin - 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 unit
plugin - the plugin

findBySectorId

java.util.List<Unit> findBySectorId(long lIdSector)
Return all the Unit of the Sector

Parameters:
lIdSector - id sector
Returns:
all the Unit of the Sector


Copyright © 2012 Mairie de Paris. All Rights Reserved.