. */ require_once(FILESYSTEMROOTPATH."jc/include/dao/Elections_BodiesDao.php"); class Elections_BodiesService { private $elections_bodiesDao; /** * Default constructor * * @param Elections_BodiesDao */ public function __construct(Elections_BodiesDao $elections_bodiesDao) { $this->elections_bodiesDao = $elections_bodiesDao; } /** * Load an elections_Bodies by id * * @param string id of the elections_Bodies to be loaded * @return an Elections_Bodies object */ public function load($id) { return $this->elections_bodiesDao->load($id); } /** * Load an election_Bodies by election_id and BodyCode * * @param id of the election and bodycode to be loaded * @return an election_Bodies object */ public function find($election_id, $bodyCode){ return $this->elections_bodiesDao->find($election_id, $bodyCode); } public function getBodyVotes($uid){ return $this->elections_bodiesDao->getBodyVotes($uid); } public function getMyLocal($uid){ return $this->elections_bodiesDao->getMyLocal($uid); } public function getMyVotes($eb, $uid){ return $this->elections_bodiesDao->getMyVotes($eb, $uid); } public function getRank($eb, $uid){ return $this->elections_bodiesDao->getRank($eb, $uid); } public function getLocal_delegates($bodyCode){ return $this->elections_bodiesDao->getLocal_delegates($bodyCode); } public function increase($id,$rank){ return $this->elections_bodiesDao->increase($id,$rank); } /** * Save or update election: * * @param election object * @return boolean [success or fail] */ public function saveOrUpdate($elections_bodies){ return $this->elections_bodiesDao->saveOrUpdate($elections_bodies); } } ?>