Example #1
0
 /**
  * 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 Paciente (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->setPacienteNombre($this->getPacienteNombre());
     $copyObj->setPacienteAp($this->getPacienteAp());
     $copyObj->setPacienteAm($this->getPacienteAm());
     $copyObj->setPacienteCalle($this->getPacienteCalle());
     $copyObj->setPacienteNoexterior($this->getPacienteNoexterior());
     $copyObj->setPacienteNointerior($this->getPacienteNointerior());
     $copyObj->setPacienteColonia($this->getPacienteColonia());
     $copyObj->setPacienteCodigopostal($this->getPacienteCodigopostal());
     $copyObj->setPacienteCiudad($this->getPacienteCiudad());
     $copyObj->setPacienteEstado($this->getPacienteEstado());
     $copyObj->setPacientePais($this->getPacientePais());
     $copyObj->setPacienteTelefono($this->getPacienteTelefono());
     $copyObj->setPacienteTelefonocelular($this->getPacienteTelefonocelular());
     $copyObj->setPacienteFechanacimiento($this->getPacienteFechanacimiento());
     $copyObj->setPacienteSexo($this->getPacienteSexo());
     $copyObj->setPacienteEstadocivil($this->getPacienteEstadocivil());
     $copyObj->setPacienteOcupacion($this->getPacienteOcupacion());
     $copyObj->setPacienteConyuge($this->getPacienteConyuge());
     $copyObj->setPacientePadre($this->getPacientePadre());
     $copyObj->setPacienteMadre($this->getPacienteMadre());
     $copyObj->setPacienteResponsable($this->getPacienteResponsable());
     $copyObj->setPacienteTelefonoresponsable($this->getPacienteTelefonoresponsable());
     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->getAdmisions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addAdmision($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getCitas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addCita($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getConsultas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addConsulta($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPacientefacturacions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPacientefacturacion($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getVentas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addVenta($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setIdpaciente(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Example #2
0
 /**
  * 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 Medico (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->setIdespecialidad($this->getIdespecialidad());
     $copyObj->setMedicoNombre($this->getMedicoNombre());
     $copyObj->setMedicoApellidopaterno($this->getMedicoApellidopaterno());
     $copyObj->setMedicoApellidomaterno($this->getMedicoApellidomaterno());
     $copyObj->setMedicoCalle($this->getMedicoCalle());
     $copyObj->setMedicoNoexterior($this->getMedicoNoexterior());
     $copyObj->setMedicoNointerior($this->getMedicoNointerior());
     $copyObj->setMedicoColonia($this->getMedicoColonia());
     $copyObj->setMedicoCodigopostal($this->getMedicoCodigopostal());
     $copyObj->setMedicoCiudad($this->getMedicoCiudad());
     $copyObj->setMedicoEstado($this->getMedicoEstado());
     $copyObj->setMedicoPais($this->getMedicoPais());
     $copyObj->setMedicoTelefono($this->getMedicoTelefono());
     $copyObj->setMedicoTelefonocelular($this->getMedicoTelefonocelular());
     $copyObj->setMedicoClave($this->getMedicoClave());
     $copyObj->setMedicoDgp($this->getMedicoDgp());
     $copyObj->setMedicoSsa($this->getMedicoSsa());
     $copyObj->setMedicoAe($this->getMedicoAe());
     $copyObj->setMedicoFotografia($this->getMedicoFotografia());
     $copyObj->setMedicoPerfilcompleto($this->getMedicoPerfilcompleto());
     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->getAdmisions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addAdmision($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getCitas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addCita($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getConsultas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addConsulta($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getMedicoespecialidads() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMedicoespecialidad($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getMedicofacturacions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMedicofacturacion($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setIdmedico(NULL);
         // this is a auto-increment column, so set to default value
     }
 }