/**
	 *
	 * Renvoi sous forme d'un tableau la liste des aid d'un utilisateur. Pour le statut cpe ou scolarité, renvoi la liste des aid des élèves sous la responsabilité de l'utilisateur
	 *
	 * @param      PropelPDO $con (optional) The PropelPDO connection to use.
	 * @return     PropelObjectCollection AidDetails[]
	 */
	public function getAidDetailss($criteria = null, PropelPDO $con = null) {
		if(null === $this->collAidDetailss || null !== $criteria) {
			if ($this->isNew() && null === $this->collAidDetailss) {
				// return empty collection
				$this->initAidDetailss();
			} else {
				$collAidDetailss = parent::getAidDetailss($criteria, $con);

				if ($this->statut == "cpe") {
				    $aid_col = AidDetailsQuery::create(null, $criteria)
					    ->useJAidElevesQuery()
					    ->useEleveQuery()
					    ->useJEleveCpeQuery()
					    ->filterByUtilisateurProfessionnel($this)
					    ->endUse()->endUse()->endUse()
					    ->distinct()
					    ->find($con);
				    $collAidDetailss->addCollection($aid_col);
				} else if ($this->statut == "scolarite") {
				    $aid_col = AidDetailsQuery::create(null, $criteria)
					    ->useJAidElevesQuery()->useEleveQuery()->useJEleveClasseQuery()->useClasseQuery()->useJScolClassesQuery()
					    ->filterByUtilisateurProfessionnel($this)
					    ->endUse()->endUse()->endUse()->endUse()->endUse()
					    ->find($con);
				    $collAidDetailss->addCollection($aid_col);
				}
				if (null !== $criteria) {
					return $collAidDetailss;
				}
				$this->collAidDetailss = $collAidDetailss;
			}
		}
		return $this->collAidDetailss;
	}
	/**
	 * Returns a peer instance associated with this om.
	 *
	 * Since Peer classes are not to have any instance attributes, this method returns the
	 * same instance for all member of this class. The method could therefore
	 * be static, but this would prevent one from overriding the behavior.
	 *
	 * @return     UtilisateurProfessionnelPeer
	 */
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new UtilisateurProfessionnelPeer();
		}
		return self::$peer;
	}