Пример #1
0
	/**
	 * @param	JEleveGroupe $jEleveGroupe The jEleveGroupe object to add.
	 */
	protected function doAddJEleveGroupe($jEleveGroupe)
	{
		$this->collJEleveGroupes[]= $jEleveGroupe;
		$jEleveGroupe->setEleve($this);
	}
Пример #2
0
	/**
	 * Exclude object from result
	 *
	 * @param     JEleveGroupe $jEleveGroupe Object to remove from the list of results
	 *
	 * @return    JEleveGroupeQuery The current query, for fluid interface
	 */
	public function prune($jEleveGroupe = null)
	{
		if ($jEleveGroupe) {
			$this->addCond('pruneCond0', $this->getAliasedColName(JEleveGroupePeer::LOGIN), $jEleveGroupe->getLogin(), Criteria::NOT_EQUAL);
			$this->addCond('pruneCond1', $this->getAliasedColName(JEleveGroupePeer::ID_GROUPE), $jEleveGroupe->getIdGroupe(), Criteria::NOT_EQUAL);
			$this->addCond('pruneCond2', $this->getAliasedColName(JEleveGroupePeer::PERIODE), $jEleveGroupe->getPeriode(), Criteria::NOT_EQUAL);
			$this->combine(array('pruneCond0', 'pruneCond1', 'pruneCond2'), Criteria::LOGICAL_OR);
		}

		return $this;
	}
Пример #3
0
	/**
	 *
	 * Ajoute un eleve a un groupe
	 * Manually added for N:M relationship
	 * It seems that the groupes are passed by values and not by references.
	 *
	 * @param      PropelPDO $con (optional) The PropelPDO connection to use.
	 * @return     array Eleves[]
	 */
	public function addEleve(Eleve $eleve, $num_periode_notes = null) {
		if ($eleve->getId() == null) {
			throw new PropelException("Eleve id ne doit pas etre null");
		}
		if ($num_periode_notes == null) {
		    $periode = $this->getPeriodeNoteOuverte();
		    if ($periode != null) {
			$num_periode_notes = $periode->getNumPeriode();
		    }
		}
		$jEleveGroupe = new JEleveGroupe();
		$jEleveGroupe->setEleve($eleve);
		$jEleveGroupe->setPeriode($num_periode_notes);
		$this->addJEleveGroupe($jEleveGroupe);
		$jEleveGroupe->save();
		$eleve->clearPeriodeNotes();
	}
Пример #4
0
	/**
	 * Filter the query by a related JEleveGroupe object
	 *
	 * @param     JEleveGroupe $jEleveGroupe  the related object to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    GroupeQuery The current query, for fluid interface
	 */
	public function filterByJEleveGroupe($jEleveGroupe, $comparison = null)
	{
		if ($jEleveGroupe instanceof JEleveGroupe) {
			return $this
				->addUsingAlias(GroupePeer::ID, $jEleveGroupe->getIdGroupe(), $comparison);
		} elseif ($jEleveGroupe instanceof PropelCollection) {
			return $this
				->useJEleveGroupeQuery()
				->filterByPrimaryKeys($jEleveGroupe->getPrimaryKeys())
				->endUse();
		} else {
			throw new PropelException('filterByJEleveGroupe() only accepts arguments of type JEleveGroupe or PropelCollection');
		}
	}