/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Eleve (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setNoGep($this->getNoGep()); $copyObj->setLogin($this->getLogin()); $copyObj->setNom($this->getNom()); $copyObj->setPrenom($this->getPrenom()); $copyObj->setSexe($this->getSexe()); $copyObj->setNaissance($this->getNaissance()); $copyObj->setLieuNaissance($this->getLieuNaissance()); $copyObj->setElenoet($this->getElenoet()); $copyObj->setEreno($this->getEreno()); $copyObj->setEleId($this->getEleId()); $copyObj->setEmail($this->getEmail()); $copyObj->setDateSortie($this->getDateSortie()); $copyObj->setMefCode($this->getMefCode()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); // store object hash to prevent cycle $this->startCopy = true; foreach ($this->getJEleveClasses() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveClasse($relObj->copy($deepCopy)); } } foreach ($this->getJEleveCpes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveCpe($relObj->copy($deepCopy)); } } foreach ($this->getJEleveGroupes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveGroupe($relObj->copy($deepCopy)); } } foreach ($this->getJEleveProfesseurPrincipals() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveProfesseurPrincipal($relObj->copy($deepCopy)); } } $relObj = $this->getEleveRegimeDoublant(); if ($relObj) { $copyObj->setEleveRegimeDoublant($relObj->copy($deepCopy)); } foreach ($this->getResponsableInformations() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addResponsableInformation($relObj->copy($deepCopy)); } } foreach ($this->getJEleveAncienEtablissements() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveAncienEtablissement($relObj->copy($deepCopy)); } } foreach ($this->getJAidElevess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJAidEleves($relObj->copy($deepCopy)); } } foreach ($this->getAbsenceEleveSaisies() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAbsenceEleveSaisie($relObj->copy($deepCopy)); } } foreach ($this->getAbsenceAgregationDecomptes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAbsenceAgregationDecompte($relObj->copy($deepCopy)); } } foreach ($this->getCreditEctss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCreditEcts($relObj->copy($deepCopy)); } } foreach ($this->getCreditEctsGlobals() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCreditEctsGlobal($relObj->copy($deepCopy)); } } foreach ($this->getArchiveEctss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addArchiveEcts($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value } }
/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Groupe (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false, $makeNew = true) { $copyObj->setName($this->getName()); $copyObj->setDescription($this->getDescription()); $copyObj->setRecalculRang($this->getRecalculRang()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); // store object hash to prevent cycle $this->startCopy = true; foreach ($this->getJGroupesProfesseurss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJGroupesProfesseurs($relObj->copy($deepCopy)); } } foreach ($this->getJGroupesMatieress() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJGroupesMatieres($relObj->copy($deepCopy)); } } foreach ($this->getJGroupesClassess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJGroupesClasses($relObj->copy($deepCopy)); } } foreach ($this->getCahierTexteCompteRendus() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCahierTexteCompteRendu($relObj->copy($deepCopy)); } } foreach ($this->getCahierTexteTravailAFaires() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCahierTexteTravailAFaire($relObj->copy($deepCopy)); } } foreach ($this->getCahierTexteNoticePrivees() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCahierTexteNoticePrivee($relObj->copy($deepCopy)); } } foreach ($this->getJEleveGroupes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addJEleveGroupe($relObj->copy($deepCopy)); } } foreach ($this->getAbsenceEleveSaisies() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAbsenceEleveSaisie($relObj->copy($deepCopy)); } } foreach ($this->getCreditEctss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCreditEcts($relObj->copy($deepCopy)); } } foreach ($this->getEdtEmplacementCourss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEdtEmplacementCours($relObj->copy($deepCopy)); } } //unflag object copy $this->startCopy = false; } // if ($deepCopy) if ($makeNew) { $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value } }