public function load($id)
 {
     //sobrescrito!
     //load da agregação com turma no get_alunos !!!!!!!
     //load da agregação com turma no get_disciplinas !!!!!!!
     $anoLetivo = new AnoLetivo($this->anoletivo_id);
     return parent::load($id);
 }
示例#2
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Contact objects
     $repository = new TRepository('Contact');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('customer_id', '=', $id));
     $this->contacts = $repository->load($criteria);
     // load the object itself
     return parent::load($id);
 }
示例#3
0
 public function load($id)
 {
     $repository = new TRepository('ImovelProprietarios');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('tb_imovel_imovel_id', '=', $id));
     $imovelproprietario = $repository->load($criteria);
     if ($imovelproprietario) {
         foreach ($imovelproprietario as $imovelproprietarios) {
             $proprietario = new Contribuinte($imovelproprietarios->tb_contribuinte_contribuinte_id);
             $this->addProprietario($proprietario);
         }
     }
     return parent::load($id);
 }
示例#4
0
 public function load($id)
 {
     $repository = new TRepository('LogradouroBairro');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('tb_logradouros_logra_id', '=', $id));
     $logradourobairro = $repository->load($criteria);
     if ($logradourobairro) {
         foreach ($logradourobairro as $logradourobairros) {
             $bairro = new Bairro($logradourobairros->tb_bairros_bairros_id);
             $this->addBairro($bairro);
         }
     }
     // load the object itself
     return parent::load($id);
 }
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related System_program objects
     $repository = new TRepository('SystemGroupProgram');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('system_group_id', '=', $id));
     $system_group_system_programs = $repository->load($criteria);
     if ($system_group_system_programs) {
         foreach ($system_group_system_programs as $system_group_system_program) {
             $system_program = new SystemProgram($system_group_system_program->system_program_id);
             $this->addSystemProgram($system_program);
         }
     }
     // load the object itself
     return parent::load($id);
 }
示例#6
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Skill objects
     $repository = new TRepository('CustomerSkill');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('customer_id', '=', $id));
     $customer_skills = $repository->load($criteria);
     if ($customer_skills) {
         foreach ($customer_skills as $customer_skill) {
             $skill = new Skill($customer_skill->skill_id);
             $this->addSkill($skill);
         }
     }
     // load the object itself
     return parent::load($id);
 }
示例#7
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Item objects
     $repository = new TRepository('Item');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('srp_id', '=', $id));
     $this->items = $repository->load($criteria);
     // load the object itself
     return parent::load($id);
 }
示例#8
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->skills = parent::loadAggregate('Skill', 'CustomerSkill', 'customer_id', 'skill_id', $id);
     $this->contacts = parent::loadComposite('Contact', 'customer_id', $id);
     // load the object itself
     return parent::load($id);
 }
示例#9
0
 /**
  * Load the object and the aggregates
  */
 public function load($id)
 {
     $book_author_rep = new TRepository('BookAuthor');
     $book_subject_rep = new TRepository('BookSubject');
     $item_rep = new TRepository('Item');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('book_id', '=', $id));
     // load the Author aggregates
     $book_authors = $book_author_rep->load($criteria);
     if ($book_authors) {
         foreach ($book_authors as $book_author) {
             $author = new Author($book_author->author_id);
             $this->addAuthor($author);
         }
     }
     // load the Subject aggregates
     $book_subjects = $book_subject_rep->load($criteria);
     if ($book_subjects) {
         foreach ($book_subjects as $book_subject) {
             $subject = new Subject($book_subject->subject_id);
             $this->addSubject($subject);
         }
     }
     // load the Item composition
     $items = $item_rep->load($criteria);
     if ($items) {
         foreach ($items as $item) {
             $this->addItem($item);
         }
     }
     // load the object itself
     return parent::load($id);
 }
示例#10
0
 public function onBeforeStore($object)
 {
     $this->lastState = array();
     if (self::exists($object->id)) {
         $this->lastState = parent::load($object->id)->toArray();
     }
     // file_put_contents('/tmp/log.txt', "Before Store ".print_r($object, TRUE), FILE_APPEND);
 }
示例#11
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->produtoss = parent::loadAggregate('Produtos', 'PedidosProdutos', 'pedidos_id', 'produtos_id', $id);
     // load the object itself
     return parent::load($id);
 }
示例#12
0
 public function load($id)
 {
     //$this->enderecos = parent::loadComposite('endereco','idpessoa');
     $this->contatos = parent::loadComposite('contato', 'idpessoa', $id);
     return parent::load($id);
 }
示例#13
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Item objects
     $repository = new TRepository('ItemRequisicao');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('requisicao_id', '=', $id));
     $requisicao_items = $repository->load($criteria);
     if ($requisicao_items) {
         foreach ($requisicao_items as $requisicao_item) {
             $item = new Item($requisicao_item->item_id);
             $item->justificativa = $requisicao_item->justificativa;
             $item->quantidade = $requisicao_item->quantidade;
             $item->prazoEntrega = $requisicao_item->prazoEntrega;
             $item->total = $item->quantidade * $item->valorUnitario;
             $this->addItem($item);
         }
     }
     // load the object itself
     return parent::load($id);
 }
示例#14
0
 /**
  * Load the object and the aggregates
  */
 public function load($id)
 {
     $member_project_rep = new TRepository('MemberProject');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('id_member', '=', $id));
     // load the aggregates
     $member_projects = $member_project_rep->load($criteria);
     if ($member_projects) {
         foreach ($member_projects as $member_project) {
             $project = new Project($member_project->id_project);
             $this->addProject($project);
         }
     }
     // load the object itself
     return parent::load($id);
 }
示例#15
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->contacts = parent::loadComposite('Contact', 'customer_id', $id);
     // load the object itself
     return parent::load($id);
 }
示例#16
0
 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Item objects
     $repository = new TRepository('ItemCessao');
     $criteria = new TCriteria();
     $criteria->setProperty('order', 'item_id');
     $criteria->add(new TFilter('cessao_id', '=', $id));
     $cessao_items = $repository->load($criteria);
     if ($cessao_items) {
         foreach ($cessao_items as $cessao_item) {
             $item = new Item($cessao_item->item_id);
             $item->quantidade = $cessao_item->quantidade;
             $item->total = $item->quantidade * $item->valorUnitario;
             $this->addItem($item);
         }
     }
     // load the object itself
     return parent::load($id);
 }