/** * 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 kuser (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->setLoginDataId($this->login_data_id); $copyObj->setIsAdmin($this->is_admin); $copyObj->setScreenName($this->screen_name); $copyObj->setFullName($this->full_name); $copyObj->setFirstName($this->first_name); $copyObj->setLastName($this->last_name); $copyObj->setEmail($this->email); $copyObj->setSha1Password($this->sha1_password); $copyObj->setSalt($this->salt); $copyObj->setDateOfBirth($this->date_of_birth); $copyObj->setCountry($this->country); $copyObj->setState($this->state); $copyObj->setCity($this->city); $copyObj->setZip($this->zip); $copyObj->setUrlList($this->url_list); $copyObj->setPicture($this->picture); $copyObj->setIcon($this->icon); $copyObj->setAboutMe($this->about_me); $copyObj->setTags($this->tags); $copyObj->setTagline($this->tagline); $copyObj->setNetworkHighschool($this->network_highschool); $copyObj->setNetworkCollege($this->network_college); $copyObj->setNetworkOther($this->network_other); $copyObj->setMobileNum($this->mobile_num); $copyObj->setMatureContent($this->mature_content); $copyObj->setGender($this->gender); $copyObj->setRegistrationIp($this->registration_ip); $copyObj->setRegistrationCookie($this->registration_cookie); $copyObj->setImList($this->im_list); $copyObj->setViews($this->views); $copyObj->setFans($this->fans); $copyObj->setEntries($this->entries); $copyObj->setStorageSize($this->storage_size); $copyObj->setProducedKshows($this->produced_kshows); $copyObj->setStatus($this->status); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); $copyObj->setPartnerId($this->partner_id); $copyObj->setDisplayInSearch($this->display_in_search); $copyObj->setPartnerData($this->partner_data); $copyObj->setPuserId($this->puser_id); $copyObj->setAdminTags($this->admin_tags); $copyObj->setIndexedPartnerDataInt($this->indexed_partner_data_int); $copyObj->setIndexedPartnerDataString($this->indexed_partner_data_string); $copyObj->setCustomData($this->custom_data); $copyObj->setType($this->type); 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->getkshows() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addkshow($relObj->copy($deepCopy)); } } foreach ($this->getentrys() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addentry($relObj->copy($deepCopy)); } } foreach ($this->getcomments() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addcomment($relObj->copy($deepCopy)); } } foreach ($this->getflags() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addflag($relObj->copy($deepCopy)); } } foreach ($this->getfavorites() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addfavorite($relObj->copy($deepCopy)); } } foreach ($this->getKshowKusers() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addKshowKuser($relObj->copy($deepCopy)); } } foreach ($this->getPuserKusers() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addPuserKuser($relObj->copy($deepCopy)); } } foreach ($this->getPartners() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addPartner($relObj->copy($deepCopy)); } } foreach ($this->getmoderations() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addmoderation($relObj->copy($deepCopy)); } } foreach ($this->getmoderationFlagsRelatedByKuserId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addmoderationFlagRelatedByKuserId($relObj->copy($deepCopy)); } } foreach ($this->getmoderationFlagsRelatedByFlaggedKuserId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addmoderationFlagRelatedByFlaggedKuserId($relObj->copy($deepCopy)); } } foreach ($this->getcategoryKusers() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addcategoryKuser($relObj->copy($deepCopy)); } } foreach ($this->getUploadTokens() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addUploadToken($relObj->copy($deepCopy)); } } foreach ($this->getKuserToUserRoles() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addKuserToUserRole($relObj->copy($deepCopy)); } } foreach ($this->getKuserKgroupsRelatedByKgroupId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addKuserKgroupRelatedByKgroupId($relObj->copy($deepCopy)); } } foreach ($this->getKuserKgroupsRelatedByKuserId() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addKuserKgroupRelatedByKuserId($relObj->copy($deepCopy)); } } foreach ($this->getUserEntrys() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addUserEntry($relObj->copy($deepCopy)); } } } // if ($deepCopy) $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 UserRole (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->setStrId($this->str_id); $copyObj->setName($this->name); $copyObj->setDescription($this->description); $copyObj->setPartnerId($this->partner_id); $copyObj->setStatus($this->status); $copyObj->setPermissionNames($this->permission_names); $copyObj->setTags($this->tags); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); $copyObj->setCustomData($this->custom_data); 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->getKuserToUserRoles() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addKuserToUserRole($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }