/** * Selects a collection of ConceptPropertyHistory objects pre-filled with all related objects. * * @return array Array of ConceptPropertyHistory objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAll(Criteria $c, $con = null) { $c = clone $c; // Set the correct dbName if it has not been overridden if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } ConceptPropertyHistoryPeer::addSelectColumns($c); $startcol2 = ConceptPropertyHistoryPeer::NUM_COLUMNS - ConceptPropertyHistoryPeer::NUM_LAZY_LOAD_COLUMNS + 1; ConceptPropertyPeer::addSelectColumns($c, 'a1'); $startcol3 = $startcol2 + ConceptPropertyPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::CONCEPT_PROPERTY_ID, ConceptPropertyPeer::alias('a1', ConceptPropertyPeer::ID)); $c->addAlias('a1', ConceptPropertyPeer::TABLE_NAME); ConceptPeer::addSelectColumns($c, 'a2'); $startcol4 = $startcol3 + ConceptPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::CONCEPT_ID, ConceptPeer::alias('a2', ConceptPeer::ID)); $c->addAlias('a2', ConceptPeer::TABLE_NAME); VocabularyPeer::addSelectColumns($c, 'a3'); $startcol5 = $startcol4 + VocabularyPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::VOCABULARY_ID, VocabularyPeer::alias('a3', VocabularyPeer::ID)); $c->addAlias('a3', VocabularyPeer::TABLE_NAME); SkosPropertyPeer::addSelectColumns($c, 'a4'); $startcol6 = $startcol5 + SkosPropertyPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::SKOS_PROPERTY_ID, SkosPropertyPeer::alias('a4', SkosPropertyPeer::ID)); $c->addAlias('a4', SkosPropertyPeer::TABLE_NAME); VocabularyPeer::addSelectColumns($c, 'a5'); $startcol7 = $startcol6 + VocabularyPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::SCHEME_ID, VocabularyPeer::alias('a5', VocabularyPeer::ID)); $c->addAlias('a5', VocabularyPeer::TABLE_NAME); ConceptPeer::addSelectColumns($c, 'a6'); $startcol8 = $startcol7 + ConceptPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::RELATED_CONCEPT_ID, ConceptPeer::alias('a6', ConceptPeer::ID)); $c->addAlias('a6', ConceptPeer::TABLE_NAME); StatusPeer::addSelectColumns($c, 'a7'); $startcol9 = $startcol8 + StatusPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::STATUS_ID, StatusPeer::alias('a7', StatusPeer::ID)); $c->addAlias('a7', StatusPeer::TABLE_NAME); UserPeer::addSelectColumns($c, 'a8'); $startcol10 = $startcol9 + UserPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::CREATED_USER_ID, UserPeer::alias('a8', UserPeer::ID)); $c->addAlias('a8', UserPeer::TABLE_NAME); FileImportHistoryPeer::addSelectColumns($c, 'a9'); $startcol11 = $startcol10 + FileImportHistoryPeer::NUM_COLUMNS; $c->addJoin(ConceptPropertyHistoryPeer::IMPORT_ID, FileImportHistoryPeer::alias('a9', FileImportHistoryPeer::ID)); $c->addAlias('a9', FileImportHistoryPeer::TABLE_NAME); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = ConceptPropertyHistoryPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); // Add objects for joined ConceptProperty rows $omClass = ConceptPropertyPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getConceptProperty(); // CHECKME if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addConceptPropertyHistory($obj1); // CHECKME break; } } if ($newObject) { $obj2->initConceptPropertyHistorys(); $obj2->addConceptPropertyHistory($obj1); } // Add objects for joined Concept rows $omClass = ConceptPeer::getOMClass(); $cls = Propel::import($omClass); $obj3 = new $cls(); $obj3->hydrate($rs, $startcol3); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj3 = $temp_obj1->getConceptRelatedByConceptId(); // CHECKME if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addConceptPropertyHistoryRelatedByConceptId($obj1); // CHECKME break; } } if ($newObject) { $obj3->initConceptPropertyHistorysRelatedByConceptId(); $obj3->addConceptPropertyHistoryRelatedByConceptId($obj1); } // Add objects for joined Vocabulary rows $omClass = VocabularyPeer::getOMClass(); $cls = Propel::import($omClass); $obj4 = new $cls(); $obj4->hydrate($rs, $startcol4); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj4 = $temp_obj1->getVocabularyRelatedByVocabularyId(); // CHECKME if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addConceptPropertyHistoryRelatedByVocabularyId($obj1); // CHECKME break; } } if ($newObject) { $obj4->initConceptPropertyHistorysRelatedByVocabularyId(); $obj4->addConceptPropertyHistoryRelatedByVocabularyId($obj1); } // Add objects for joined SkosProperty rows $omClass = SkosPropertyPeer::getOMClass(); $cls = Propel::import($omClass); $obj5 = new $cls(); $obj5->hydrate($rs, $startcol5); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj5 = $temp_obj1->getSkosProperty(); // CHECKME if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) { $newObject = false; $temp_obj5->addConceptPropertyHistory($obj1); // CHECKME break; } } if ($newObject) { $obj5->initConceptPropertyHistorys(); $obj5->addConceptPropertyHistory($obj1); } // Add objects for joined Vocabulary rows $omClass = VocabularyPeer::getOMClass(); $cls = Propel::import($omClass); $obj6 = new $cls(); $obj6->hydrate($rs, $startcol6); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj6 = $temp_obj1->getVocabularyRelatedBySchemeId(); // CHECKME if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) { $newObject = false; $temp_obj6->addConceptPropertyHistoryRelatedBySchemeId($obj1); // CHECKME break; } } if ($newObject) { $obj6->initConceptPropertyHistorysRelatedBySchemeId(); $obj6->addConceptPropertyHistoryRelatedBySchemeId($obj1); } // Add objects for joined Concept rows $omClass = ConceptPeer::getOMClass(); $cls = Propel::import($omClass); $obj7 = new $cls(); $obj7->hydrate($rs, $startcol7); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj7 = $temp_obj1->getConceptRelatedByRelatedConceptId(); // CHECKME if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) { $newObject = false; $temp_obj7->addConceptPropertyHistoryRelatedByRelatedConceptId($obj1); // CHECKME break; } } if ($newObject) { $obj7->initConceptPropertyHistorysRelatedByRelatedConceptId(); $obj7->addConceptPropertyHistoryRelatedByRelatedConceptId($obj1); } // Add objects for joined Status rows $omClass = StatusPeer::getOMClass(); $cls = Propel::import($omClass); $obj8 = new $cls(); $obj8->hydrate($rs, $startcol8); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj8 = $temp_obj1->getStatus(); // CHECKME if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) { $newObject = false; $temp_obj8->addConceptPropertyHistory($obj1); // CHECKME break; } } if ($newObject) { $obj8->initConceptPropertyHistorys(); $obj8->addConceptPropertyHistory($obj1); } // Add objects for joined User rows $omClass = UserPeer::getOMClass(); $cls = Propel::import($omClass); $obj9 = new $cls(); $obj9->hydrate($rs, $startcol9); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj9 = $temp_obj1->getUser(); // CHECKME if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) { $newObject = false; $temp_obj9->addConceptPropertyHistory($obj1); // CHECKME break; } } if ($newObject) { $obj9->initConceptPropertyHistorys(); $obj9->addConceptPropertyHistory($obj1); } // Add objects for joined FileImportHistory rows $omClass = FileImportHistoryPeer::getOMClass(); $cls = Propel::import($omClass); $obj10 = new $cls(); $obj10->hydrate($rs, $startcol10); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj10 = $temp_obj1->getFileImportHistory(); // CHECKME if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) { $newObject = false; $temp_obj10->addConceptPropertyHistory($obj1); // CHECKME break; } } if ($newObject) { $obj10->initConceptPropertyHistorys(); $obj10->addConceptPropertyHistory($obj1); } $results[] = $obj1; } return $results; }
/** * Add all the columns needed to create a new object. * * Note: any columns that were marked with lazyLoad="true" in the * XML schema will not be added to the select list and only loaded * on demand. * * @param criteria object containing the columns to add. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function addSelectColumns(Criteria $criteria, $tableAlias = null) { $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::ID) : SkosPropertyPeer::ID); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::PARENT_ID) : SkosPropertyPeer::PARENT_ID); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::INVERSE_ID) : SkosPropertyPeer::INVERSE_ID); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::NAME) : SkosPropertyPeer::NAME); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::URI) : SkosPropertyPeer::URI); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::OBJECT_TYPE) : SkosPropertyPeer::OBJECT_TYPE); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::DISPLAY_ORDER) : SkosPropertyPeer::DISPLAY_ORDER); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::PICKLIST_ORDER) : SkosPropertyPeer::PICKLIST_ORDER); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::LABEL) : SkosPropertyPeer::LABEL); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::DEFINITION) : SkosPropertyPeer::DEFINITION); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::COMMENT) : SkosPropertyPeer::COMMENT); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::EXAMPLES) : SkosPropertyPeer::EXAMPLES); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::IS_REQUIRED) : SkosPropertyPeer::IS_REQUIRED); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::IS_RECIPROCAL) : SkosPropertyPeer::IS_RECIPROCAL); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::IS_SINGLETON) : SkosPropertyPeer::IS_SINGLETON); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::IS_SCHEME) : SkosPropertyPeer::IS_SCHEME); $criteria->addSelectColumn($tableAlias ? SkosPropertyPeer::alias($tableAlias, SkosPropertyPeer::IS_IN_PICKLIST) : SkosPropertyPeer::IS_IN_PICKLIST); }