Ejemplo n.º 1
0
	/**
	 * Filter the query by a related Matiere object
	 *
	 * @param     Matiere|PropelCollection $matiere The related object(s) to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    JProfesseursMatieresQuery The current query, for fluid interface
	 */
	public function filterByMatiere($matiere, $comparison = null)
	{
		if ($matiere instanceof Matiere) {
			return $this
				->addUsingAlias(JProfesseursMatieresPeer::ID_MATIERE, $matiere->getMatiere(), $comparison);
		} elseif ($matiere instanceof PropelCollection) {
			if (null === $comparison) {
				$comparison = Criteria::IN;
			}
			return $this
				->addUsingAlias(JProfesseursMatieresPeer::ID_MATIERE, $matiere->toKeyValue('PrimaryKey', 'Matiere'), $comparison);
		} else {
			throw new PropelException('filterByMatiere() only accepts arguments of type Matiere or PropelCollection');
		}
	}
Ejemplo n.º 2
0
	/**
	 * Declares an association between this object and a Matiere object.
	 *
	 * @param      Matiere $v
	 * @return     JGroupesMatieres The current object (for fluent API support)
	 * @throws     PropelException
	 */
	public function setMatiere(Matiere $v = null)
	{
		if ($v === null) {
			$this->setIdMatiere(NULL);
		} else {
			$this->setIdMatiere($v->getMatiere());
		}

		$this->aMatiere = $v;

		// Add binding for other direction of this n:n relationship.
		// If this object has already been added to the Matiere object, it will not be re-added.
		if ($v !== null) {
			$v->addJGroupesMatieres($this);
		}

		return $this;
	}
Ejemplo n.º 3
0
	/**
	 * Exclude object from result
	 *
	 * @param     Matiere $matiere Object to remove from the list of results
	 *
	 * @return    MatiereQuery The current query, for fluid interface
	 */
	public function prune($matiere = null)
	{
		if ($matiere) {
			$this->addUsingAlias(MatierePeer::MATIERE, $matiere->getMatiere(), Criteria::NOT_EQUAL);
		}

		return $this;
	}