fr.paris.lutece.plugins.unittree.service.sector
Interface ISectorService

All Known Implementing Classes:
SectorService

public interface ISectorService

ISectorService


Method Summary
 void addSectorsToUnit(Unit unit, java.util.List<java.lang.Integer> listIdsSector)
          Add sectors to the unit
 java.util.List<Sector> findAll()
          Find all sectors
 java.util.List<Sector> findByIdUnit(int nIdUnit)
          find a list of sectors from a given id unit
 Sector findByPrimaryKey(int nIdSector)
          Find a sector from its primary key
 java.util.List<java.lang.Integer> getIdsSectorByIdUnit(int nIdUnit)
          Get the ids sector from a given id unit
 boolean hasSector(int nIdUnit, int nIdSector)
          Check if the unit has the sector
 boolean hasSectors(int nIdUnit)
          Check if the unit has sectors
 void removeSector(int nIdUnit, int nIdSector)
          Remove the sectors from an unit
 void removeSectorsFromUnit(int nIdUnit)
          Remove the sectors from an unit
 

Method Detail

findByPrimaryKey

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

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

findByIdUnit

java.util.List<Sector> findByIdUnit(int nIdUnit)
find a list of sectors from a given id unit

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

findAll

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

Returns:
a list of Sector

getIdsSectorByIdUnit

java.util.List<java.lang.Integer> getIdsSectorByIdUnit(int nIdUnit)
Get the ids sector from a given id unit

Parameters:
nIdUnit - the id unit
Returns:
a list of ids sector

hasSectors

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

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

hasSector

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

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

addSectorsToUnit

@Transactional(value="unittree.transactionManager")
void addSectorsToUnit(Unit unit,
                                    java.util.List<java.lang.Integer> listIdsSector)
Add sectors to the unit

Parameters:
unit - the unit
listIdsSector - the list of ids sector

removeSectorsFromUnit

@Transactional(value="unittree.transactionManager")
void removeSectorsFromUnit(int nIdUnit)
Remove the sectors from an unit

Parameters:
nIdUnit - the id unit

removeSector

@Transactional(value="unittree.transactionManager")
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.