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

java.lang.Object
  extended by fr.paris.lutece.plugins.unittree.business.sector.SectorHome

public final class SectorHome
extends java.lang.Object

SectorHome


Method Summary
static void addSectorToUnit(int nIdUnit, int nIdSector)
          Add a sector to an unit
static java.util.List<Sector> findAll()
          Find all sectors
static java.util.List<Sector> findByIdUnit(int nIdUnit)
          Find sectors from a given id unit
static Sector findByPrimaryKey(int nIdSector)
          Find a sector from its primary key
static boolean hasSector(int nIdUnit, int nIdSector)
          Check if the unit has a sector
static boolean hasSectors(int nIdUnit)
          Check if the unit has a sectors
static void removeSector(int nIdUnit, int nIdSector)
          Remove the sectors from an unit
static void removeSectorsFromUnit(int nIdUnit)
          Remove the sectors from an unit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findByPrimaryKey

public static Sector findByPrimaryKey(int nIdSector)
Find a sector from its primary key

Parameters:
nIdSector - the id sector
Returns:
an instance of Sector

findAll

public static java.util.List<Sector> findAll()
Find all sectors

Returns:
the sectors

findByIdUnit

public static java.util.List<Sector> findByIdUnit(int nIdUnit)
Find sectors from a given id unit

Parameters:
nIdUnit - the id unit
Returns:
a list of Sector

addSectorToUnit

public static void addSectorToUnit(int nIdUnit,
                                   int nIdSector)
Add a sector to an unit

Parameters:
nIdUnit - the id unit
nIdSector - the id sector

hasSector

public static boolean hasSector(int nIdUnit,
                                int nIdSector)
Check if the unit has a sector

Parameters:
nIdUnit - the id unit
nIdSector - the id sector
Returns:
true if the unit has the sector, false otherwise

hasSectors

public static boolean hasSectors(int nIdUnit)
Check if the unit has a sectors

Parameters:
nIdUnit - the id unit
Returns:
true if the unit has sectors, false otherwise

removeSectorsFromUnit

public static void removeSectorsFromUnit(int nIdUnit)
Remove the sectors from an unit

Parameters:
nIdUnit - the id unit

removeSector

public static void removeSector(int nIdUnit,
                                int nIdSector)
Remove the sectors from an unit

Parameters:
nIdUnit - the id unit
nIdSector - the id sector


Copyright © 2012 Mairie de Paris. All Rights Reserved.