/**
  * generates a group news, unless the sf_news_cache already has it
  *
  * @return return 1 if the news was created, 0 otherwise
  * @author Guglielmo Celata
  **/
 public function generateUnlessAlreadyHasGroupNews()
 {
     $data = $this->getData();
     $politico_id = $this->getOppCarica()->getPoliticoId();
     $cnt = 0;
     // controllo e scrittura notizie di rilevanza 1 (in un certo giorno c'è stato un intervento su un certo atto)
     $has_group = oppNewsPeer::hasGroupEmendamento($data, 'OppPolitico', $politico_id);
     if (!$has_group) {
         oppNewsPeer::addGroupEmendamento($data, 'OppPolitico', $politico_id);
         $cnt++;
     }
     return $cnt;
 }
 /**
  * generates a group news, unless the sf_news_cache already has it
  *
  * @return return 1 if the news was created, 0 otherwise
  * @author Guglielmo Celata
  **/
 public function generateUnlessAlreadyHasGroupNews()
 {
     $data = $this->getOppEmendamento()->getDataPres();
     $atto_id = $this->getAttoId();
     $cnt = 0;
     // controllo e scrittura notizie di rilevanza 1
     // (in un certo giorno sono stati presentati emendamenti su un certo atto)
     $has_group = oppNewsPeer::hasGroupEmendamento($data, 'OppAtto', $atto_id);
     if (!$has_group) {
         oppNewsPeer::addGroupEmendamento($data, 'OppAtto', $atto_id);
         $cnt++;
     }
     return $cnt;
 }