. */ require_once(FILESYSTEMROOTPATH."jc/include/dao/DelegatesDao.php"); class DelegatesService { private $delegatesDao; /** * Default constructor * * @param DelegatesDao */ public function __construct(DelegatesDao $delegatesDao) { $this->delegatesDao = $delegatesDao; } /** * Load a Delegates by id * * @param string uid of the Delegate to be loaded * @return a Delegate object */ public function load($uid) { return $this->delegatesDao->load($uid); } /** * Load all Delegates * * @return array of Delegates */ public function loadAll() { return $this->delegatesDao->loadAll(); } public function getBodyCodes(){ return $this->delegatesDao->getBodyCodes(); } public function getBodyNames(){ return $this->delegatesDao->getBodyNames(); } public function getBodyName($bodyCode){ return $this->delegatesDao->getBodyName($bodyCode); } public function getDelegatesByBody($bodyCode){ return $this->delegatesDao->getDelegatesByBody($bodyCode); } public function import($filename, $agora_id){ $res = $this->delegatesDao->import($filename, $agora_id); $this->delegatesDao->createNotificationsAll(); return $res; } /** * Save or update Delegates: */ public function SaveOrUpdate($delegate){ return $this->delegatesDao->saveOrUpdate($delegate); } public function insert($delegate){ $res = $this->delegatesDao->insert($delegate); $this->delegatesDao->createNotifications($delegate->getUid()); return $res; } } ?>