fr.paris.lutece.plugins.unittree.business.sector
Class SectorDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.unittree.business.sector.SectorDAO
All Implemented Interfaces:
ISectorDAO

public class SectorDAO
extends java.lang.Object
implements ISectorDAO

SectorDAO


Constructor Summary
SectorDAO()
           
 
Method Summary
 void addSectorToUnit(int nIdUnit, int nIdSector, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add a sector to an unit
 boolean hasSector(int nIdUnit, int nIdSector, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if the given id unit has the given sector
 boolean hasSectors(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if the given id unit has the given sector
 Sector load(int nIdSector, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load a sector
 java.util.List<Sector> loadAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load all sectors
 java.util.List<Sector> loadByIdUnit(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load sectors from a given id unit
 void removeSector(int nIdUnit, int nIdSector, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove sectors from a given id unit
 void removeSectorsFromUnit(int nIdUnit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove sectors from a given id unit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SectorDAO

public SectorDAO()
Method Detail

load

public Sector load(int nIdSector,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a sector

Specified by:
load in interface ISectorDAO
Parameters:
nIdSector - the id sector
plugin - the plugin
Returns:
an instance of Sector

loadAll

public java.util.List<Sector> loadAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load all sectors

Specified by:
loadAll in interface ISectorDAO
Parameters:
plugin - the plugin
Returns:
a list of Sector

loadByIdUnit

public java.util.List<Sector> loadByIdUnit(int nIdUnit,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load sectors from a given id unit

Specified by:
loadByIdUnit in interface ISectorDAO
Parameters:
nIdUnit - the id unit
plugin - the plugin
Returns:
a list of Sector

addSectorToUnit

public void addSectorToUnit(int nIdUnit,
                            int nIdSector,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add a sector to an unit

Specified by:
addSectorToUnit in interface ISectorDAO
Parameters:
nIdUnit - the id unit
nIdSector - the id sector
plugin - the plugin

hasSector

public boolean hasSector(int nIdUnit,
                         int nIdSector,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the given id unit has the given sector

Specified by:
hasSector in interface ISectorDAO
Parameters:
nIdUnit - the id unit
nIdSector - the id sector
plugin - the plugin
Returns:
true if the unit has the sector, false otherwise

hasSectors

public boolean hasSectors(int nIdUnit,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the given id unit has the given sector

Specified by:
hasSectors in interface ISectorDAO
Parameters:
nIdUnit - the id unit
plugin - the plugin
Returns:
true if the unit has the sector, false otherwise

removeSectorsFromUnit

public void removeSectorsFromUnit(int nIdUnit,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove sectors from a given id unit

Specified by:
removeSectorsFromUnit in interface ISectorDAO
Parameters:
nIdUnit - the id unit
plugin - the plugin

removeSector

public void removeSector(int nIdUnit,
                         int nIdSector,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove sectors from a given id unit

Specified by:
removeSector in interface ISectorDAO
Parameters:
nIdUnit - the id unit
nIdSector - the id sector
plugin - the plugin


Copyright © 2012 Mairie de Paris. All Rights Reserved.