/** * 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 ProfileProperty (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->setSkosId($this->skos_id); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); $copyObj->setDeletedAt($this->deleted_at); $copyObj->setCreatedBy($this->created_by); $copyObj->setUpdatedBy($this->updated_by); $copyObj->setDeletedBy($this->deleted_by); $copyObj->setProfileId($this->profile_id); $copyObj->setSkosParentId($this->skos_parent_id); $copyObj->setName($this->name); $copyObj->setLabel($this->label); $copyObj->setDefinition($this->definition); $copyObj->setComment($this->comment); $copyObj->setType($this->type); $copyObj->setUri($this->uri); $copyObj->setStatusId($this->status_id); $copyObj->setLanguage($this->language); $copyObj->setNote($this->note); $copyObj->setDisplayOrder($this->display_order); $copyObj->setExportOrder($this->export_order); $copyObj->setPicklistOrder($this->picklist_order); $copyObj->setExamples($this->examples); $copyObj->setIsRequired($this->is_required); $copyObj->setIsReciprocal($this->is_reciprocal); $copyObj->setIsSingleton($this->is_singleton); $copyObj->setIsInPicklist($this->is_in_picklist); $copyObj->setIsInExport($this->is_in_export); $copyObj->setInverseProfilePropertyId($this->inverse_profile_property_id); $copyObj->setIsInClassPicklist($this->is_in_class_picklist); $copyObj->setIsInPropertyPicklist($this->is_in_property_picklist); $copyObj->setIsInRdf($this->is_in_rdf); $copyObj->setIsInXsd($this->is_in_xsd); $copyObj->setIsAttribute($this->is_attribute); $copyObj->setHasLanguage($this->has_language); $copyObj->setIsObjectProp($this->is_object_prop); $copyObj->setIsInForm($this->is_in_form); $copyObj->setNamespce($this->namespce); 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->getProfilePropertysRelatedByInverseProfilePropertyId() as $relObj) { if ($this->getPrimaryKey() === $relObj->getPrimaryKey()) { continue; } $copyObj->addProfilePropertyRelatedByInverseProfilePropertyId($relObj->copy($deepCopy)); } foreach ($this->getConceptPropertysRelatedBySkosPropertyId() as $relObj) { $copyObj->addConceptPropertyRelatedBySkosPropertyId($relObj->copy($deepCopy)); } foreach ($this->getConceptPropertysRelatedByProfilePropertyId() as $relObj) { $copyObj->addConceptPropertyRelatedByProfilePropertyId($relObj->copy($deepCopy)); } foreach ($this->getSchemaPropertyElements() as $relObj) { $copyObj->addSchemaPropertyElement($relObj->copy($deepCopy)); } foreach ($this->getSchemaPropertyElementHistorys() as $relObj) { $copyObj->addSchemaPropertyElementHistory($relObj->copy($deepCopy)); } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a pkey 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 Status (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->setDisplayOrder($this->display_order); $copyObj->setDisplayName($this->display_name); $copyObj->setUri($this->uri); 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->getProfiles() as $relObj) { $copyObj->addProfile($relObj->copy($deepCopy)); } foreach ($this->getProfilePropertys() as $relObj) { $copyObj->addProfileProperty($relObj->copy($deepCopy)); } foreach ($this->getCollections() as $relObj) { $copyObj->addCollection($relObj->copy($deepCopy)); } foreach ($this->getConcepts() as $relObj) { $copyObj->addConcept($relObj->copy($deepCopy)); } foreach ($this->getConceptPropertys() as $relObj) { $copyObj->addConceptProperty($relObj->copy($deepCopy)); } foreach ($this->getConceptPropertyHistorys() as $relObj) { $copyObj->addConceptPropertyHistory($relObj->copy($deepCopy)); } foreach ($this->getSchemas() as $relObj) { $copyObj->addSchema($relObj->copy($deepCopy)); } foreach ($this->getSchemaPropertys() as $relObj) { $copyObj->addSchemaProperty($relObj->copy($deepCopy)); } foreach ($this->getSchemaPropertyElements() as $relObj) { $copyObj->addSchemaPropertyElement($relObj->copy($deepCopy)); } foreach ($this->getSchemaPropertyElementHistorys() as $relObj) { $copyObj->addSchemaPropertyElementHistory($relObj->copy($deepCopy)); } foreach ($this->getVocabularys() as $relObj) { $copyObj->addVocabulary($relObj->copy($deepCopy)); } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a pkey column, so set to default value }