/** * 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 Usuario (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setIdIdioma($this->id_idioma); $copyObj->setUsuario($this->usuario); $copyObj->setClave($this->clave); $copyObj->setNombre($this->nombre); $copyObj->setApellido1($this->apellido1); $copyObj->setApellido2($this->apellido2); $copyObj->setDni($this->dni); $copyObj->setDomicilio($this->domicilio); $copyObj->setPoblacion($this->poblacion); $copyObj->setCp($this->cp); $copyObj->setIdProvincia($this->id_provincia); $copyObj->setPais($this->pais); $copyObj->setMovil($this->movil); $copyObj->setTelefono($this->telefono); $copyObj->setFax($this->fax); $copyObj->setUltimaVisita($this->ultima_visita); $copyObj->setEmail($this->email); $copyObj->setPublicKey($this->public_key); $copyObj->setEsExterno($this->es_externo); $copyObj->setAlertaEmail($this->alerta_email); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); $copyObj->setFechaBorrado($this->fecha_borrado); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getUsuarioGrupos() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addUsuarioGrupo($relObj->copy($deepCopy)); } } foreach ($this->getAlcances() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAlcance($relObj->copy($deepCopy)); } } foreach ($this->getSesions() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addSesion($relObj->copy($deepCopy)); } } foreach ($this->getMensajes() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMensaje($relObj->copy($deepCopy)); } } foreach ($this->getMensajeDestinos() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMensajeDestino($relObj->copy($deepCopy)); } } foreach ($this->getEmpresas() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEmpresa($relObj->copy($deepCopy)); } } foreach ($this->getTablas() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTabla($relObj->copy($deepCopy)); } } foreach ($this->getFormulariosRelatedByIdUsuario() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addFormularioRelatedByIdUsuario($relObj->copy($deepCopy)); } } foreach ($this->getFormulariosRelatedByIdUsuarioCreador() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addFormularioRelatedByIdUsuarioCreador($relObj->copy($deepCopy)); } } foreach ($this->getTareas() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addTarea($relObj->copy($deepCopy)); } } foreach ($this->getHistoricoDocumentos() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addHistoricoDocumento($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setIdUsuario(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 Mensaje (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setIdUsuario($this->id_usuario); $copyObj->setAsunto($this->asunto); $copyObj->setCuerpo($this->cuerpo); $copyObj->setFecha($this->fecha); $copyObj->setEmail($this->email); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); $copyObj->setBorrado($this->borrado); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getMensajeDestinos() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMensajeDestino($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setIdMensaje(NULL); // this is a auto-increment column, so set to default value }