BaseCcShowInstancesPeer.php 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569
  1. <?php
  2. /**
  3. * Base static class for performing query and update operations on the 'cc_show_instances' table.
  4. *
  5. *
  6. *
  7. * @package propel.generator.airtime.om
  8. */
  9. abstract class BaseCcShowInstancesPeer {
  10. /** the default database name for this class */
  11. const DATABASE_NAME = 'airtime';
  12. /** the table name for this class */
  13. const TABLE_NAME = 'cc_show_instances';
  14. /** the related Propel class for this table */
  15. const OM_CLASS = 'CcShowInstances';
  16. /** A class that can be returned by this peer. */
  17. const CLASS_DEFAULT = 'airtime.CcShowInstances';
  18. /** the related TableMap class for this table */
  19. const TM_CLASS = 'CcShowInstancesTableMap';
  20. /** The total number of columns. */
  21. const NUM_COLUMNS = 12;
  22. /** The number of lazy-loaded columns. */
  23. const NUM_LAZY_LOAD_COLUMNS = 0;
  24. /** the column name for the ID field */
  25. const ID = 'cc_show_instances.ID';
  26. /** the column name for the STARTS field */
  27. const STARTS = 'cc_show_instances.STARTS';
  28. /** the column name for the ENDS field */
  29. const ENDS = 'cc_show_instances.ENDS';
  30. /** the column name for the SHOW_ID field */
  31. const SHOW_ID = 'cc_show_instances.SHOW_ID';
  32. /** the column name for the RECORD field */
  33. const RECORD = 'cc_show_instances.RECORD';
  34. /** the column name for the REBROADCAST field */
  35. const REBROADCAST = 'cc_show_instances.REBROADCAST';
  36. /** the column name for the INSTANCE_ID field */
  37. const INSTANCE_ID = 'cc_show_instances.INSTANCE_ID';
  38. /** the column name for the FILE_ID field */
  39. const FILE_ID = 'cc_show_instances.FILE_ID';
  40. /** the column name for the TIME_FILLED field */
  41. const TIME_FILLED = 'cc_show_instances.TIME_FILLED';
  42. /** the column name for the CREATED field */
  43. const CREATED = 'cc_show_instances.CREATED';
  44. /** the column name for the LAST_SCHEDULED field */
  45. const LAST_SCHEDULED = 'cc_show_instances.LAST_SCHEDULED';
  46. /** the column name for the MODIFIED_INSTANCE field */
  47. const MODIFIED_INSTANCE = 'cc_show_instances.MODIFIED_INSTANCE';
  48. /**
  49. * An identiy map to hold any loaded instances of CcShowInstances objects.
  50. * This must be public so that other peer classes can access this when hydrating from JOIN
  51. * queries.
  52. * @var array CcShowInstances[]
  53. */
  54. public static $instances = array();
  55. /**
  56. * holds an array of fieldnames
  57. *
  58. * first dimension keys are the type constants
  59. * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
  60. */
  61. private static $fieldNames = array (
  62. BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbShowId', 'DbRecord', 'DbRebroadcast', 'DbOriginalShow', 'DbRecordedFile', 'DbTimeFilled', 'DbCreated', 'DbLastScheduled', 'DbModifiedInstance', ),
  63. BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbShowId', 'dbRecord', 'dbRebroadcast', 'dbOriginalShow', 'dbRecordedFile', 'dbTimeFilled', 'dbCreated', 'dbLastScheduled', 'dbModifiedInstance', ),
  64. BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::SHOW_ID, self::RECORD, self::REBROADCAST, self::INSTANCE_ID, self::FILE_ID, self::TIME_FILLED, self::CREATED, self::LAST_SCHEDULED, self::MODIFIED_INSTANCE, ),
  65. BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'SHOW_ID', 'RECORD', 'REBROADCAST', 'INSTANCE_ID', 'FILE_ID', 'TIME_FILLED', 'CREATED', 'LAST_SCHEDULED', 'MODIFIED_INSTANCE', ),
  66. BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'show_id', 'record', 'rebroadcast', 'instance_id', 'file_id', 'time_filled', 'created', 'last_scheduled', 'modified_instance', ),
  67. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
  68. );
  69. /**
  70. * holds an array of keys for quick access to the fieldnames array
  71. *
  72. * first dimension keys are the type constants
  73. * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
  74. */
  75. private static $fieldKeys = array (
  76. BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbStarts' => 1, 'DbEnds' => 2, 'DbShowId' => 3, 'DbRecord' => 4, 'DbRebroadcast' => 5, 'DbOriginalShow' => 6, 'DbRecordedFile' => 7, 'DbTimeFilled' => 8, 'DbCreated' => 9, 'DbLastScheduled' => 10, 'DbModifiedInstance' => 11, ),
  77. BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbShowId' => 3, 'dbRecord' => 4, 'dbRebroadcast' => 5, 'dbOriginalShow' => 6, 'dbRecordedFile' => 7, 'dbTimeFilled' => 8, 'dbCreated' => 9, 'dbLastScheduled' => 10, 'dbModifiedInstance' => 11, ),
  78. BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::SHOW_ID => 3, self::RECORD => 4, self::REBROADCAST => 5, self::INSTANCE_ID => 6, self::FILE_ID => 7, self::TIME_FILLED => 8, self::CREATED => 9, self::LAST_SCHEDULED => 10, self::MODIFIED_INSTANCE => 11, ),
  79. BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'SHOW_ID' => 3, 'RECORD' => 4, 'REBROADCAST' => 5, 'INSTANCE_ID' => 6, 'FILE_ID' => 7, 'TIME_FILLED' => 8, 'CREATED' => 9, 'LAST_SCHEDULED' => 10, 'MODIFIED_INSTANCE' => 11, ),
  80. BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'show_id' => 3, 'record' => 4, 'rebroadcast' => 5, 'instance_id' => 6, 'file_id' => 7, 'time_filled' => 8, 'created' => 9, 'last_scheduled' => 10, 'modified_instance' => 11, ),
  81. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
  82. );
  83. /**
  84. * Translates a fieldname to another type
  85. *
  86. * @param string $name field name
  87. * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  88. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  89. * @param string $toType One of the class type constants
  90. * @return string translated name of the field.
  91. * @throws PropelException - if the specified name could not be found in the fieldname mappings.
  92. */
  93. static public function translateFieldName($name, $fromType, $toType)
  94. {
  95. $toNames = self::getFieldNames($toType);
  96. $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
  97. if ($key === null) {
  98. throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
  99. }
  100. return $toNames[$key];
  101. }
  102. /**
  103. * Returns an array of field names.
  104. *
  105. * @param string $type The type of fieldnames to return:
  106. * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  107. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  108. * @return array A list of field names
  109. */
  110. static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
  111. {
  112. if (!array_key_exists($type, self::$fieldNames)) {
  113. throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
  114. }
  115. return self::$fieldNames[$type];
  116. }
  117. /**
  118. * Convenience method which changes table.column to alias.column.
  119. *
  120. * Using this method you can maintain SQL abstraction while using column aliases.
  121. * <code>
  122. * $c->addAlias("alias1", TablePeer::TABLE_NAME);
  123. * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
  124. * </code>
  125. * @param string $alias The alias for the current table.
  126. * @param string $column The column name for current table. (i.e. CcShowInstancesPeer::COLUMN_NAME).
  127. * @return string
  128. */
  129. public static function alias($alias, $column)
  130. {
  131. return str_replace(CcShowInstancesPeer::TABLE_NAME.'.', $alias.'.', $column);
  132. }
  133. /**
  134. * Add all the columns needed to create a new object.
  135. *
  136. * Note: any columns that were marked with lazyLoad="true" in the
  137. * XML schema will not be added to the select list and only loaded
  138. * on demand.
  139. *
  140. * @param Criteria $criteria object containing the columns to add.
  141. * @param string $alias optional table alias
  142. * @throws PropelException Any exceptions caught during processing will be
  143. * rethrown wrapped into a PropelException.
  144. */
  145. public static function addSelectColumns(Criteria $criteria, $alias = null)
  146. {
  147. if (null === $alias) {
  148. $criteria->addSelectColumn(CcShowInstancesPeer::ID);
  149. $criteria->addSelectColumn(CcShowInstancesPeer::STARTS);
  150. $criteria->addSelectColumn(CcShowInstancesPeer::ENDS);
  151. $criteria->addSelectColumn(CcShowInstancesPeer::SHOW_ID);
  152. $criteria->addSelectColumn(CcShowInstancesPeer::RECORD);
  153. $criteria->addSelectColumn(CcShowInstancesPeer::REBROADCAST);
  154. $criteria->addSelectColumn(CcShowInstancesPeer::INSTANCE_ID);
  155. $criteria->addSelectColumn(CcShowInstancesPeer::FILE_ID);
  156. $criteria->addSelectColumn(CcShowInstancesPeer::TIME_FILLED);
  157. $criteria->addSelectColumn(CcShowInstancesPeer::CREATED);
  158. $criteria->addSelectColumn(CcShowInstancesPeer::LAST_SCHEDULED);
  159. $criteria->addSelectColumn(CcShowInstancesPeer::MODIFIED_INSTANCE);
  160. } else {
  161. $criteria->addSelectColumn($alias . '.ID');
  162. $criteria->addSelectColumn($alias . '.STARTS');
  163. $criteria->addSelectColumn($alias . '.ENDS');
  164. $criteria->addSelectColumn($alias . '.SHOW_ID');
  165. $criteria->addSelectColumn($alias . '.RECORD');
  166. $criteria->addSelectColumn($alias . '.REBROADCAST');
  167. $criteria->addSelectColumn($alias . '.INSTANCE_ID');
  168. $criteria->addSelectColumn($alias . '.FILE_ID');
  169. $criteria->addSelectColumn($alias . '.TIME_FILLED');
  170. $criteria->addSelectColumn($alias . '.CREATED');
  171. $criteria->addSelectColumn($alias . '.LAST_SCHEDULED');
  172. $criteria->addSelectColumn($alias . '.MODIFIED_INSTANCE');
  173. }
  174. }
  175. /**
  176. * Returns the number of rows matching criteria.
  177. *
  178. * @param Criteria $criteria
  179. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  180. * @param PropelPDO $con
  181. * @return int Number of matching rows.
  182. */
  183. public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
  184. {
  185. // we may modify criteria, so copy it first
  186. $criteria = clone $criteria;
  187. // We need to set the primary table name, since in the case that there are no WHERE columns
  188. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  189. // tables go into the FROM clause.
  190. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  191. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  192. $criteria->setDistinct();
  193. }
  194. if (!$criteria->hasSelectClause()) {
  195. CcShowInstancesPeer::addSelectColumns($criteria);
  196. }
  197. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  198. $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
  199. if ($con === null) {
  200. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  201. }
  202. // BasePeer returns a PDOStatement
  203. $stmt = BasePeer::doCount($criteria, $con);
  204. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  205. $count = (int) $row[0];
  206. } else {
  207. $count = 0; // no rows returned; we infer that means 0 matches.
  208. }
  209. $stmt->closeCursor();
  210. return $count;
  211. }
  212. /**
  213. * Method to select one object from the DB.
  214. *
  215. * @param Criteria $criteria object used to create the SELECT statement.
  216. * @param PropelPDO $con
  217. * @return CcShowInstances
  218. * @throws PropelException Any exceptions caught during processing will be
  219. * rethrown wrapped into a PropelException.
  220. */
  221. public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
  222. {
  223. $critcopy = clone $criteria;
  224. $critcopy->setLimit(1);
  225. $objects = CcShowInstancesPeer::doSelect($critcopy, $con);
  226. if ($objects) {
  227. return $objects[0];
  228. }
  229. return null;
  230. }
  231. /**
  232. * Method to do selects.
  233. *
  234. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  235. * @param PropelPDO $con
  236. * @return array Array of selected Objects
  237. * @throws PropelException Any exceptions caught during processing will be
  238. * rethrown wrapped into a PropelException.
  239. */
  240. public static function doSelect(Criteria $criteria, PropelPDO $con = null)
  241. {
  242. return CcShowInstancesPeer::populateObjects(CcShowInstancesPeer::doSelectStmt($criteria, $con));
  243. }
  244. /**
  245. * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
  246. *
  247. * Use this method directly if you want to work with an executed statement durirectly (for example
  248. * to perform your own object hydration).
  249. *
  250. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  251. * @param PropelPDO $con The connection to use
  252. * @throws PropelException Any exceptions caught during processing will be
  253. * rethrown wrapped into a PropelException.
  254. * @return PDOStatement The executed PDOStatement object.
  255. * @see BasePeer::doSelect()
  256. */
  257. public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
  258. {
  259. if ($con === null) {
  260. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  261. }
  262. if (!$criteria->hasSelectClause()) {
  263. $criteria = clone $criteria;
  264. CcShowInstancesPeer::addSelectColumns($criteria);
  265. }
  266. // Set the correct dbName
  267. $criteria->setDbName(self::DATABASE_NAME);
  268. // BasePeer returns a PDOStatement
  269. return BasePeer::doSelect($criteria, $con);
  270. }
  271. /**
  272. * Adds an object to the instance pool.
  273. *
  274. * Propel keeps cached copies of objects in an instance pool when they are retrieved
  275. * from the database. In some cases -- especially when you override doSelect*()
  276. * methods in your stub classes -- you may need to explicitly add objects
  277. * to the cache in order to ensure that the same objects are always returned by doSelect*()
  278. * and retrieveByPK*() calls.
  279. *
  280. * @param CcShowInstances $value A CcShowInstances object.
  281. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  282. */
  283. public static function addInstanceToPool(CcShowInstances $obj, $key = null)
  284. {
  285. if (Propel::isInstancePoolingEnabled()) {
  286. if ($key === null) {
  287. $key = (string) $obj->getDbId();
  288. } // if key === null
  289. self::$instances[$key] = $obj;
  290. }
  291. }
  292. /**
  293. * Removes an object from the instance pool.
  294. *
  295. * Propel keeps cached copies of objects in an instance pool when they are retrieved
  296. * from the database. In some cases -- especially when you override doDelete
  297. * methods in your stub classes -- you may need to explicitly remove objects
  298. * from the cache in order to prevent returning objects that no longer exist.
  299. *
  300. * @param mixed $value A CcShowInstances object or a primary key value.
  301. */
  302. public static function removeInstanceFromPool($value)
  303. {
  304. if (Propel::isInstancePoolingEnabled() && $value !== null) {
  305. if (is_object($value) && $value instanceof CcShowInstances) {
  306. $key = (string) $value->getDbId();
  307. } elseif (is_scalar($value)) {
  308. // assume we've been passed a primary key
  309. $key = (string) $value;
  310. } else {
  311. $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcShowInstances object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
  312. throw $e;
  313. }
  314. unset(self::$instances[$key]);
  315. }
  316. } // removeInstanceFromPool()
  317. /**
  318. * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
  319. *
  320. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  321. * a multi-column primary key, a serialize()d version of the primary key will be returned.
  322. *
  323. * @param string $key The key (@see getPrimaryKeyHash()) for this instance.
  324. * @return CcShowInstances Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
  325. * @see getPrimaryKeyHash()
  326. */
  327. public static function getInstanceFromPool($key)
  328. {
  329. if (Propel::isInstancePoolingEnabled()) {
  330. if (isset(self::$instances[$key])) {
  331. return self::$instances[$key];
  332. }
  333. }
  334. return null; // just to be explicit
  335. }
  336. /**
  337. * Clear the instance pool.
  338. *
  339. * @return void
  340. */
  341. public static function clearInstancePool()
  342. {
  343. self::$instances = array();
  344. }
  345. /**
  346. * Method to invalidate the instance pool of all tables related to cc_show_instances
  347. * by a foreign key with ON DELETE CASCADE
  348. */
  349. public static function clearRelatedInstancePool()
  350. {
  351. // Invalidate objects in CcShowInstancesPeer instance pool,
  352. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  353. CcShowInstancesPeer::clearInstancePool();
  354. // Invalidate objects in CcSchedulePeer instance pool,
  355. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  356. CcSchedulePeer::clearInstancePool();
  357. // Invalidate objects in CcPlayoutHistoryPeer instance pool,
  358. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  359. CcPlayoutHistoryPeer::clearInstancePool();
  360. }
  361. /**
  362. * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
  363. *
  364. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  365. * a multi-column primary key, a serialize()d version of the primary key will be returned.
  366. *
  367. * @param array $row PropelPDO resultset row.
  368. * @param int $startcol The 0-based offset for reading from the resultset row.
  369. * @return string A string version of PK or NULL if the components of primary key in result array are all null.
  370. */
  371. public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
  372. {
  373. // If the PK cannot be derived from the row, return NULL.
  374. if ($row[$startcol] === null) {
  375. return null;
  376. }
  377. return (string) $row[$startcol];
  378. }
  379. /**
  380. * Retrieves the primary key from the DB resultset row
  381. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  382. * a multi-column primary key, an array of the primary key columns will be returned.
  383. *
  384. * @param array $row PropelPDO resultset row.
  385. * @param int $startcol The 0-based offset for reading from the resultset row.
  386. * @return mixed The primary key of the row
  387. */
  388. public static function getPrimaryKeyFromRow($row, $startcol = 0)
  389. {
  390. return (int) $row[$startcol];
  391. }
  392. /**
  393. * The returned array will contain objects of the default type or
  394. * objects that inherit from the default.
  395. *
  396. * @throws PropelException Any exceptions caught during processing will be
  397. * rethrown wrapped into a PropelException.
  398. */
  399. public static function populateObjects(PDOStatement $stmt)
  400. {
  401. $results = array();
  402. // set the class once to avoid overhead in the loop
  403. $cls = CcShowInstancesPeer::getOMClass(false);
  404. // populate the object(s)
  405. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  406. $key = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  407. if (null !== ($obj = CcShowInstancesPeer::getInstanceFromPool($key))) {
  408. // We no longer rehydrate the object, since this can cause data loss.
  409. // See http://www.propelorm.org/ticket/509
  410. // $obj->hydrate($row, 0, true); // rehydrate
  411. $results[] = $obj;
  412. } else {
  413. $obj = new $cls();
  414. $obj->hydrate($row);
  415. $results[] = $obj;
  416. CcShowInstancesPeer::addInstanceToPool($obj, $key);
  417. } // if key exists
  418. }
  419. $stmt->closeCursor();
  420. return $results;
  421. }
  422. /**
  423. * Populates an object of the default type or an object that inherit from the default.
  424. *
  425. * @param array $row PropelPDO resultset row.
  426. * @param int $startcol The 0-based offset for reading from the resultset row.
  427. * @throws PropelException Any exceptions caught during processing will be
  428. * rethrown wrapped into a PropelException.
  429. * @return array (CcShowInstances object, last column rank)
  430. */
  431. public static function populateObject($row, $startcol = 0)
  432. {
  433. $key = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol);
  434. if (null !== ($obj = CcShowInstancesPeer::getInstanceFromPool($key))) {
  435. // We no longer rehydrate the object, since this can cause data loss.
  436. // See http://www.propelorm.org/ticket/509
  437. // $obj->hydrate($row, $startcol, true); // rehydrate
  438. $col = $startcol + CcShowInstancesPeer::NUM_COLUMNS;
  439. } else {
  440. $cls = CcShowInstancesPeer::OM_CLASS;
  441. $obj = new $cls();
  442. $col = $obj->hydrate($row, $startcol);
  443. CcShowInstancesPeer::addInstanceToPool($obj, $key);
  444. }
  445. return array($obj, $col);
  446. }
  447. /**
  448. * Returns the number of rows matching criteria, joining the related CcShow table
  449. *
  450. * @param Criteria $criteria
  451. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  452. * @param PropelPDO $con
  453. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  454. * @return int Number of matching rows.
  455. */
  456. public static function doCountJoinCcShow(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  457. {
  458. // we're going to modify criteria, so copy it first
  459. $criteria = clone $criteria;
  460. // We need to set the primary table name, since in the case that there are no WHERE columns
  461. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  462. // tables go into the FROM clause.
  463. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  464. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  465. $criteria->setDistinct();
  466. }
  467. if (!$criteria->hasSelectClause()) {
  468. CcShowInstancesPeer::addSelectColumns($criteria);
  469. }
  470. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  471. // Set the correct dbName
  472. $criteria->setDbName(self::DATABASE_NAME);
  473. if ($con === null) {
  474. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  475. }
  476. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  477. $stmt = BasePeer::doCount($criteria, $con);
  478. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  479. $count = (int) $row[0];
  480. } else {
  481. $count = 0; // no rows returned; we infer that means 0 matches.
  482. }
  483. $stmt->closeCursor();
  484. return $count;
  485. }
  486. /**
  487. * Returns the number of rows matching criteria, joining the related CcFiles table
  488. *
  489. * @param Criteria $criteria
  490. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  491. * @param PropelPDO $con
  492. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  493. * @return int Number of matching rows.
  494. */
  495. public static function doCountJoinCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  496. {
  497. // we're going to modify criteria, so copy it first
  498. $criteria = clone $criteria;
  499. // We need to set the primary table name, since in the case that there are no WHERE columns
  500. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  501. // tables go into the FROM clause.
  502. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  503. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  504. $criteria->setDistinct();
  505. }
  506. if (!$criteria->hasSelectClause()) {
  507. CcShowInstancesPeer::addSelectColumns($criteria);
  508. }
  509. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  510. // Set the correct dbName
  511. $criteria->setDbName(self::DATABASE_NAME);
  512. if ($con === null) {
  513. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  514. }
  515. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  516. $stmt = BasePeer::doCount($criteria, $con);
  517. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  518. $count = (int) $row[0];
  519. } else {
  520. $count = 0; // no rows returned; we infer that means 0 matches.
  521. }
  522. $stmt->closeCursor();
  523. return $count;
  524. }
  525. /**
  526. * Selects a collection of CcShowInstances objects pre-filled with their CcShow objects.
  527. * @param Criteria $criteria
  528. * @param PropelPDO $con
  529. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  530. * @return array Array of CcShowInstances objects.
  531. * @throws PropelException Any exceptions caught during processing will be
  532. * rethrown wrapped into a PropelException.
  533. */
  534. public static function doSelectJoinCcShow(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  535. {
  536. $criteria = clone $criteria;
  537. // Set the correct dbName if it has not been overridden
  538. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  539. $criteria->setDbName(self::DATABASE_NAME);
  540. }
  541. CcShowInstancesPeer::addSelectColumns($criteria);
  542. $startcol = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  543. CcShowPeer::addSelectColumns($criteria);
  544. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  545. $stmt = BasePeer::doSelect($criteria, $con);
  546. $results = array();
  547. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  548. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  549. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  550. // We no longer rehydrate the object, since this can cause data loss.
  551. // See http://www.propelorm.org/ticket/509
  552. // $obj1->hydrate($row, 0, true); // rehydrate
  553. } else {
  554. $cls = CcShowInstancesPeer::getOMClass(false);
  555. $obj1 = new $cls();
  556. $obj1->hydrate($row);
  557. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  558. } // if $obj1 already loaded
  559. $key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol);
  560. if ($key2 !== null) {
  561. $obj2 = CcShowPeer::getInstanceFromPool($key2);
  562. if (!$obj2) {
  563. $cls = CcShowPeer::getOMClass(false);
  564. $obj2 = new $cls();
  565. $obj2->hydrate($row, $startcol);
  566. CcShowPeer::addInstanceToPool($obj2, $key2);
  567. } // if obj2 already loaded
  568. // Add the $obj1 (CcShowInstances) to $obj2 (CcShow)
  569. $obj2->addCcShowInstances($obj1);
  570. } // if joined row was not null
  571. $results[] = $obj1;
  572. }
  573. $stmt->closeCursor();
  574. return $results;
  575. }
  576. /**
  577. * Selects a collection of CcShowInstances objects pre-filled with their CcFiles objects.
  578. * @param Criteria $criteria
  579. * @param PropelPDO $con
  580. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  581. * @return array Array of CcShowInstances objects.
  582. * @throws PropelException Any exceptions caught during processing will be
  583. * rethrown wrapped into a PropelException.
  584. */
  585. public static function doSelectJoinCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  586. {
  587. $criteria = clone $criteria;
  588. // Set the correct dbName if it has not been overridden
  589. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  590. $criteria->setDbName(self::DATABASE_NAME);
  591. }
  592. CcShowInstancesPeer::addSelectColumns($criteria);
  593. $startcol = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  594. CcFilesPeer::addSelectColumns($criteria);
  595. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  596. $stmt = BasePeer::doSelect($criteria, $con);
  597. $results = array();
  598. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  599. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  600. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  601. // We no longer rehydrate the object, since this can cause data loss.
  602. // See http://www.propelorm.org/ticket/509
  603. // $obj1->hydrate($row, 0, true); // rehydrate
  604. } else {
  605. $cls = CcShowInstancesPeer::getOMClass(false);
  606. $obj1 = new $cls();
  607. $obj1->hydrate($row);
  608. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  609. } // if $obj1 already loaded
  610. $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol);
  611. if ($key2 !== null) {
  612. $obj2 = CcFilesPeer::getInstanceFromPool($key2);
  613. if (!$obj2) {
  614. $cls = CcFilesPeer::getOMClass(false);
  615. $obj2 = new $cls();
  616. $obj2->hydrate($row, $startcol);
  617. CcFilesPeer::addInstanceToPool($obj2, $key2);
  618. } // if obj2 already loaded
  619. // Add the $obj1 (CcShowInstances) to $obj2 (CcFiles)
  620. $obj2->addCcShowInstances($obj1);
  621. } // if joined row was not null
  622. $results[] = $obj1;
  623. }
  624. $stmt->closeCursor();
  625. return $results;
  626. }
  627. /**
  628. * Returns the number of rows matching criteria, joining all related tables
  629. *
  630. * @param Criteria $criteria
  631. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  632. * @param PropelPDO $con
  633. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  634. * @return int Number of matching rows.
  635. */
  636. public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  637. {
  638. // we're going to modify criteria, so copy it first
  639. $criteria = clone $criteria;
  640. // We need to set the primary table name, since in the case that there are no WHERE columns
  641. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  642. // tables go into the FROM clause.
  643. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  644. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  645. $criteria->setDistinct();
  646. }
  647. if (!$criteria->hasSelectClause()) {
  648. CcShowInstancesPeer::addSelectColumns($criteria);
  649. }
  650. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  651. // Set the correct dbName
  652. $criteria->setDbName(self::DATABASE_NAME);
  653. if ($con === null) {
  654. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  655. }
  656. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  657. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  658. $stmt = BasePeer::doCount($criteria, $con);
  659. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  660. $count = (int) $row[0];
  661. } else {
  662. $count = 0; // no rows returned; we infer that means 0 matches.
  663. }
  664. $stmt->closeCursor();
  665. return $count;
  666. }
  667. /**
  668. * Selects a collection of CcShowInstances objects pre-filled with all related objects.
  669. *
  670. * @param Criteria $criteria
  671. * @param PropelPDO $con
  672. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  673. * @return array Array of CcShowInstances objects.
  674. * @throws PropelException Any exceptions caught during processing will be
  675. * rethrown wrapped into a PropelException.
  676. */
  677. public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  678. {
  679. $criteria = clone $criteria;
  680. // Set the correct dbName if it has not been overridden
  681. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  682. $criteria->setDbName(self::DATABASE_NAME);
  683. }
  684. CcShowInstancesPeer::addSelectColumns($criteria);
  685. $startcol2 = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  686. CcShowPeer::addSelectColumns($criteria);
  687. $startcol3 = $startcol2 + (CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS);
  688. CcFilesPeer::addSelectColumns($criteria);
  689. $startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  690. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  691. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  692. $stmt = BasePeer::doSelect($criteria, $con);
  693. $results = array();
  694. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  695. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  696. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  697. // We no longer rehydrate the object, since this can cause data loss.
  698. // See http://www.propelorm.org/ticket/509
  699. // $obj1->hydrate($row, 0, true); // rehydrate
  700. } else {
  701. $cls = CcShowInstancesPeer::getOMClass(false);
  702. $obj1 = new $cls();
  703. $obj1->hydrate($row);
  704. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  705. } // if obj1 already loaded
  706. // Add objects for joined CcShow rows
  707. $key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  708. if ($key2 !== null) {
  709. $obj2 = CcShowPeer::getInstanceFromPool($key2);
  710. if (!$obj2) {
  711. $cls = CcShowPeer::getOMClass(false);
  712. $obj2 = new $cls();
  713. $obj2->hydrate($row, $startcol2);
  714. CcShowPeer::addInstanceToPool($obj2, $key2);
  715. } // if obj2 loaded
  716. // Add the $obj1 (CcShowInstances) to the collection in $obj2 (CcShow)
  717. $obj2->addCcShowInstances($obj1);
  718. } // if joined row not null
  719. // Add objects for joined CcFiles rows
  720. $key3 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol3);
  721. if ($key3 !== null) {
  722. $obj3 = CcFilesPeer::getInstanceFromPool($key3);
  723. if (!$obj3) {
  724. $cls = CcFilesPeer::getOMClass(false);
  725. $obj3 = new $cls();
  726. $obj3->hydrate($row, $startcol3);
  727. CcFilesPeer::addInstanceToPool($obj3, $key3);
  728. } // if obj3 loaded
  729. // Add the $obj1 (CcShowInstances) to the collection in $obj3 (CcFiles)
  730. $obj3->addCcShowInstances($obj1);
  731. } // if joined row not null
  732. $results[] = $obj1;
  733. }
  734. $stmt->closeCursor();
  735. return $results;
  736. }
  737. /**
  738. * Returns the number of rows matching criteria, joining the related CcShow table
  739. *
  740. * @param Criteria $criteria
  741. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  742. * @param PropelPDO $con
  743. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  744. * @return int Number of matching rows.
  745. */
  746. public static function doCountJoinAllExceptCcShow(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  747. {
  748. // we're going to modify criteria, so copy it first
  749. $criteria = clone $criteria;
  750. // We need to set the primary table name, since in the case that there are no WHERE columns
  751. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  752. // tables go into the FROM clause.
  753. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  754. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  755. $criteria->setDistinct();
  756. }
  757. if (!$criteria->hasSelectClause()) {
  758. CcShowInstancesPeer::addSelectColumns($criteria);
  759. }
  760. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  761. // Set the correct dbName
  762. $criteria->setDbName(self::DATABASE_NAME);
  763. if ($con === null) {
  764. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  765. }
  766. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  767. $stmt = BasePeer::doCount($criteria, $con);
  768. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  769. $count = (int) $row[0];
  770. } else {
  771. $count = 0; // no rows returned; we infer that means 0 matches.
  772. }
  773. $stmt->closeCursor();
  774. return $count;
  775. }
  776. /**
  777. * Returns the number of rows matching criteria, joining the related CcShowInstancesRelatedByDbOriginalShow table
  778. *
  779. * @param Criteria $criteria
  780. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  781. * @param PropelPDO $con
  782. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  783. * @return int Number of matching rows.
  784. */
  785. public static function doCountJoinAllExceptCcShowInstancesRelatedByDbOriginalShow(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  786. {
  787. // we're going to modify criteria, so copy it first
  788. $criteria = clone $criteria;
  789. // We need to set the primary table name, since in the case that there are no WHERE columns
  790. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  791. // tables go into the FROM clause.
  792. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  793. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  794. $criteria->setDistinct();
  795. }
  796. if (!$criteria->hasSelectClause()) {
  797. CcShowInstancesPeer::addSelectColumns($criteria);
  798. }
  799. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  800. // Set the correct dbName
  801. $criteria->setDbName(self::DATABASE_NAME);
  802. if ($con === null) {
  803. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  804. }
  805. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  806. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  807. $stmt = BasePeer::doCount($criteria, $con);
  808. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  809. $count = (int) $row[0];
  810. } else {
  811. $count = 0; // no rows returned; we infer that means 0 matches.
  812. }
  813. $stmt->closeCursor();
  814. return $count;
  815. }
  816. /**
  817. * Returns the number of rows matching criteria, joining the related CcFiles table
  818. *
  819. * @param Criteria $criteria
  820. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  821. * @param PropelPDO $con
  822. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  823. * @return int Number of matching rows.
  824. */
  825. public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  826. {
  827. // we're going to modify criteria, so copy it first
  828. $criteria = clone $criteria;
  829. // We need to set the primary table name, since in the case that there are no WHERE columns
  830. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  831. // tables go into the FROM clause.
  832. $criteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  833. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  834. $criteria->setDistinct();
  835. }
  836. if (!$criteria->hasSelectClause()) {
  837. CcShowInstancesPeer::addSelectColumns($criteria);
  838. }
  839. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  840. // Set the correct dbName
  841. $criteria->setDbName(self::DATABASE_NAME);
  842. if ($con === null) {
  843. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  844. }
  845. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  846. $stmt = BasePeer::doCount($criteria, $con);
  847. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  848. $count = (int) $row[0];
  849. } else {
  850. $count = 0; // no rows returned; we infer that means 0 matches.
  851. }
  852. $stmt->closeCursor();
  853. return $count;
  854. }
  855. /**
  856. * Selects a collection of CcShowInstances objects pre-filled with all related objects except CcShow.
  857. *
  858. * @param Criteria $criteria
  859. * @param PropelPDO $con
  860. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  861. * @return array Array of CcShowInstances objects.
  862. * @throws PropelException Any exceptions caught during processing will be
  863. * rethrown wrapped into a PropelException.
  864. */
  865. public static function doSelectJoinAllExceptCcShow(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  866. {
  867. $criteria = clone $criteria;
  868. // Set the correct dbName if it has not been overridden
  869. // $criteria->getDbName() will return the same object if not set to another value
  870. // so == check is okay and faster
  871. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  872. $criteria->setDbName(self::DATABASE_NAME);
  873. }
  874. CcShowInstancesPeer::addSelectColumns($criteria);
  875. $startcol2 = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  876. CcFilesPeer::addSelectColumns($criteria);
  877. $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  878. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  879. $stmt = BasePeer::doSelect($criteria, $con);
  880. $results = array();
  881. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  882. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  883. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  884. // We no longer rehydrate the object, since this can cause data loss.
  885. // See http://www.propelorm.org/ticket/509
  886. // $obj1->hydrate($row, 0, true); // rehydrate
  887. } else {
  888. $cls = CcShowInstancesPeer::getOMClass(false);
  889. $obj1 = new $cls();
  890. $obj1->hydrate($row);
  891. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  892. } // if obj1 already loaded
  893. // Add objects for joined CcFiles rows
  894. $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  895. if ($key2 !== null) {
  896. $obj2 = CcFilesPeer::getInstanceFromPool($key2);
  897. if (!$obj2) {
  898. $cls = CcFilesPeer::getOMClass(false);
  899. $obj2 = new $cls();
  900. $obj2->hydrate($row, $startcol2);
  901. CcFilesPeer::addInstanceToPool($obj2, $key2);
  902. } // if $obj2 already loaded
  903. // Add the $obj1 (CcShowInstances) to the collection in $obj2 (CcFiles)
  904. $obj2->addCcShowInstances($obj1);
  905. } // if joined row is not null
  906. $results[] = $obj1;
  907. }
  908. $stmt->closeCursor();
  909. return $results;
  910. }
  911. /**
  912. * Selects a collection of CcShowInstances objects pre-filled with all related objects except CcShowInstancesRelatedByDbOriginalShow.
  913. *
  914. * @param Criteria $criteria
  915. * @param PropelPDO $con
  916. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  917. * @return array Array of CcShowInstances objects.
  918. * @throws PropelException Any exceptions caught during processing will be
  919. * rethrown wrapped into a PropelException.
  920. */
  921. public static function doSelectJoinAllExceptCcShowInstancesRelatedByDbOriginalShow(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  922. {
  923. $criteria = clone $criteria;
  924. // Set the correct dbName if it has not been overridden
  925. // $criteria->getDbName() will return the same object if not set to another value
  926. // so == check is okay and faster
  927. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  928. $criteria->setDbName(self::DATABASE_NAME);
  929. }
  930. CcShowInstancesPeer::addSelectColumns($criteria);
  931. $startcol2 = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  932. CcShowPeer::addSelectColumns($criteria);
  933. $startcol3 = $startcol2 + (CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS);
  934. CcFilesPeer::addSelectColumns($criteria);
  935. $startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  936. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  937. $criteria->addJoin(CcShowInstancesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
  938. $stmt = BasePeer::doSelect($criteria, $con);
  939. $results = array();
  940. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  941. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  942. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  943. // We no longer rehydrate the object, since this can cause data loss.
  944. // See http://www.propelorm.org/ticket/509
  945. // $obj1->hydrate($row, 0, true); // rehydrate
  946. } else {
  947. $cls = CcShowInstancesPeer::getOMClass(false);
  948. $obj1 = new $cls();
  949. $obj1->hydrate($row);
  950. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  951. } // if obj1 already loaded
  952. // Add objects for joined CcShow rows
  953. $key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  954. if ($key2 !== null) {
  955. $obj2 = CcShowPeer::getInstanceFromPool($key2);
  956. if (!$obj2) {
  957. $cls = CcShowPeer::getOMClass(false);
  958. $obj2 = new $cls();
  959. $obj2->hydrate($row, $startcol2);
  960. CcShowPeer::addInstanceToPool($obj2, $key2);
  961. } // if $obj2 already loaded
  962. // Add the $obj1 (CcShowInstances) to the collection in $obj2 (CcShow)
  963. $obj2->addCcShowInstances($obj1);
  964. } // if joined row is not null
  965. // Add objects for joined CcFiles rows
  966. $key3 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol3);
  967. if ($key3 !== null) {
  968. $obj3 = CcFilesPeer::getInstanceFromPool($key3);
  969. if (!$obj3) {
  970. $cls = CcFilesPeer::getOMClass(false);
  971. $obj3 = new $cls();
  972. $obj3->hydrate($row, $startcol3);
  973. CcFilesPeer::addInstanceToPool($obj3, $key3);
  974. } // if $obj3 already loaded
  975. // Add the $obj1 (CcShowInstances) to the collection in $obj3 (CcFiles)
  976. $obj3->addCcShowInstances($obj1);
  977. } // if joined row is not null
  978. $results[] = $obj1;
  979. }
  980. $stmt->closeCursor();
  981. return $results;
  982. }
  983. /**
  984. * Selects a collection of CcShowInstances objects pre-filled with all related objects except CcFiles.
  985. *
  986. * @param Criteria $criteria
  987. * @param PropelPDO $con
  988. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  989. * @return array Array of CcShowInstances objects.
  990. * @throws PropelException Any exceptions caught during processing will be
  991. * rethrown wrapped into a PropelException.
  992. */
  993. public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  994. {
  995. $criteria = clone $criteria;
  996. // Set the correct dbName if it has not been overridden
  997. // $criteria->getDbName() will return the same object if not set to another value
  998. // so == check is okay and faster
  999. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  1000. $criteria->setDbName(self::DATABASE_NAME);
  1001. }
  1002. CcShowInstancesPeer::addSelectColumns($criteria);
  1003. $startcol2 = (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
  1004. CcShowPeer::addSelectColumns($criteria);
  1005. $startcol3 = $startcol2 + (CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS);
  1006. $criteria->addJoin(CcShowInstancesPeer::SHOW_ID, CcShowPeer::ID, $join_behavior);
  1007. $stmt = BasePeer::doSelect($criteria, $con);
  1008. $results = array();
  1009. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1010. $key1 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, 0);
  1011. if (null !== ($obj1 = CcShowInstancesPeer::getInstanceFromPool($key1))) {
  1012. // We no longer rehydrate the object, since this can cause data loss.
  1013. // See http://www.propelorm.org/ticket/509
  1014. // $obj1->hydrate($row, 0, true); // rehydrate
  1015. } else {
  1016. $cls = CcShowInstancesPeer::getOMClass(false);
  1017. $obj1 = new $cls();
  1018. $obj1->hydrate($row);
  1019. CcShowInstancesPeer::addInstanceToPool($obj1, $key1);
  1020. } // if obj1 already loaded
  1021. // Add objects for joined CcShow rows
  1022. $key2 = CcShowPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  1023. if ($key2 !== null) {
  1024. $obj2 = CcShowPeer::getInstanceFromPool($key2);
  1025. if (!$obj2) {
  1026. $cls = CcShowPeer::getOMClass(false);
  1027. $obj2 = new $cls();
  1028. $obj2->hydrate($row, $startcol2);
  1029. CcShowPeer::addInstanceToPool($obj2, $key2);
  1030. } // if $obj2 already loaded
  1031. // Add the $obj1 (CcShowInstances) to the collection in $obj2 (CcShow)
  1032. $obj2->addCcShowInstances($obj1);
  1033. } // if joined row is not null
  1034. $results[] = $obj1;
  1035. }
  1036. $stmt->closeCursor();
  1037. return $results;
  1038. }
  1039. /**
  1040. * Returns the TableMap related to this peer.
  1041. * This method is not needed for general use but a specific application could have a need.
  1042. * @return TableMap
  1043. * @throws PropelException Any exceptions caught during processing will be
  1044. * rethrown wrapped into a PropelException.
  1045. */
  1046. public static function getTableMap()
  1047. {
  1048. return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
  1049. }
  1050. /**
  1051. * Add a TableMap instance to the database for this peer class.
  1052. */
  1053. public static function buildTableMap()
  1054. {
  1055. $dbMap = Propel::getDatabaseMap(BaseCcShowInstancesPeer::DATABASE_NAME);
  1056. if (!$dbMap->hasTable(BaseCcShowInstancesPeer::TABLE_NAME))
  1057. {
  1058. $dbMap->addTableObject(new CcShowInstancesTableMap());
  1059. }
  1060. }
  1061. /**
  1062. * The class that the Peer will make instances of.
  1063. *
  1064. * If $withPrefix is true, the returned path
  1065. * uses a dot-path notation which is tranalted into a path
  1066. * relative to a location on the PHP include_path.
  1067. * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
  1068. *
  1069. * @param boolean $withPrefix Whether or not to return the path with the class name
  1070. * @return string path.to.ClassName
  1071. */
  1072. public static function getOMClass($withPrefix = true)
  1073. {
  1074. return $withPrefix ? CcShowInstancesPeer::CLASS_DEFAULT : CcShowInstancesPeer::OM_CLASS;
  1075. }
  1076. /**
  1077. * Method perform an INSERT on the database, given a CcShowInstances or Criteria object.
  1078. *
  1079. * @param mixed $values Criteria or CcShowInstances object containing data that is used to create the INSERT statement.
  1080. * @param PropelPDO $con the PropelPDO connection to use
  1081. * @return mixed The new primary key.
  1082. * @throws PropelException Any exceptions caught during processing will be
  1083. * rethrown wrapped into a PropelException.
  1084. */
  1085. public static function doInsert($values, PropelPDO $con = null)
  1086. {
  1087. if ($con === null) {
  1088. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1089. }
  1090. if ($values instanceof Criteria) {
  1091. $criteria = clone $values; // rename for clarity
  1092. } else {
  1093. $criteria = $values->buildCriteria(); // build Criteria from CcShowInstances object
  1094. }
  1095. if ($criteria->containsKey(CcShowInstancesPeer::ID) && $criteria->keyContainsValue(CcShowInstancesPeer::ID) ) {
  1096. throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcShowInstancesPeer::ID.')');
  1097. }
  1098. // Set the correct dbName
  1099. $criteria->setDbName(self::DATABASE_NAME);
  1100. try {
  1101. // use transaction because $criteria could contain info
  1102. // for more than one table (I guess, conceivably)
  1103. $con->beginTransaction();
  1104. $pk = BasePeer::doInsert($criteria, $con);
  1105. $con->commit();
  1106. } catch(PropelException $e) {
  1107. $con->rollBack();
  1108. throw $e;
  1109. }
  1110. return $pk;
  1111. }
  1112. /**
  1113. * Method perform an UPDATE on the database, given a CcShowInstances or Criteria object.
  1114. *
  1115. * @param mixed $values Criteria or CcShowInstances object containing data that is used to create the UPDATE statement.
  1116. * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
  1117. * @return int The number of affected rows (if supported by underlying database driver).
  1118. * @throws PropelException Any exceptions caught during processing will be
  1119. * rethrown wrapped into a PropelException.
  1120. */
  1121. public static function doUpdate($values, PropelPDO $con = null)
  1122. {
  1123. if ($con === null) {
  1124. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1125. }
  1126. $selectCriteria = new Criteria(self::DATABASE_NAME);
  1127. if ($values instanceof Criteria) {
  1128. $criteria = clone $values; // rename for clarity
  1129. $comparison = $criteria->getComparison(CcShowInstancesPeer::ID);
  1130. $value = $criteria->remove(CcShowInstancesPeer::ID);
  1131. if ($value) {
  1132. $selectCriteria->add(CcShowInstancesPeer::ID, $value, $comparison);
  1133. } else {
  1134. $selectCriteria->setPrimaryTableName(CcShowInstancesPeer::TABLE_NAME);
  1135. }
  1136. } else { // $values is CcShowInstances object
  1137. $criteria = $values->buildCriteria(); // gets full criteria
  1138. $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
  1139. }
  1140. // set the correct dbName
  1141. $criteria->setDbName(self::DATABASE_NAME);
  1142. return BasePeer::doUpdate($selectCriteria, $criteria, $con);
  1143. }
  1144. /**
  1145. * Method to DELETE all rows from the cc_show_instances table.
  1146. *
  1147. * @return int The number of affected rows (if supported by underlying database driver).
  1148. */
  1149. public static function doDeleteAll($con = null)
  1150. {
  1151. if ($con === null) {
  1152. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1153. }
  1154. $affectedRows = 0; // initialize var to track total num of affected rows
  1155. try {
  1156. // use transaction because $criteria could contain info
  1157. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1158. $con->beginTransaction();
  1159. $affectedRows += BasePeer::doDeleteAll(CcShowInstancesPeer::TABLE_NAME, $con, CcShowInstancesPeer::DATABASE_NAME);
  1160. // Because this db requires some delete cascade/set null emulation, we have to
  1161. // clear the cached instance *after* the emulation has happened (since
  1162. // instances get re-added by the select statement contained therein).
  1163. CcShowInstancesPeer::clearInstancePool();
  1164. CcShowInstancesPeer::clearRelatedInstancePool();
  1165. $con->commit();
  1166. return $affectedRows;
  1167. } catch (PropelException $e) {
  1168. $con->rollBack();
  1169. throw $e;
  1170. }
  1171. }
  1172. /**
  1173. * Method perform a DELETE on the database, given a CcShowInstances or Criteria object OR a primary key value.
  1174. *
  1175. * @param mixed $values Criteria or CcShowInstances object or primary key or array of primary keys
  1176. * which is used to create the DELETE statement
  1177. * @param PropelPDO $con the connection to use
  1178. * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
  1179. * if supported by native driver or if emulated using Propel.
  1180. * @throws PropelException Any exceptions caught during processing will be
  1181. * rethrown wrapped into a PropelException.
  1182. */
  1183. public static function doDelete($values, PropelPDO $con = null)
  1184. {
  1185. if ($con === null) {
  1186. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1187. }
  1188. if ($values instanceof Criteria) {
  1189. // invalidate the cache for all objects of this type, since we have no
  1190. // way of knowing (without running a query) what objects should be invalidated
  1191. // from the cache based on this Criteria.
  1192. CcShowInstancesPeer::clearInstancePool();
  1193. // rename for clarity
  1194. $criteria = clone $values;
  1195. } elseif ($values instanceof CcShowInstances) { // it's a model object
  1196. // invalidate the cache for this single object
  1197. CcShowInstancesPeer::removeInstanceFromPool($values);
  1198. // create criteria based on pk values
  1199. $criteria = $values->buildPkeyCriteria();
  1200. } else { // it's a primary key, or an array of pks
  1201. $criteria = new Criteria(self::DATABASE_NAME);
  1202. $criteria->add(CcShowInstancesPeer::ID, (array) $values, Criteria::IN);
  1203. // invalidate the cache for this object(s)
  1204. foreach ((array) $values as $singleval) {
  1205. CcShowInstancesPeer::removeInstanceFromPool($singleval);
  1206. }
  1207. }
  1208. // Set the correct dbName
  1209. $criteria->setDbName(self::DATABASE_NAME);
  1210. $affectedRows = 0; // initialize var to track total num of affected rows
  1211. try {
  1212. // use transaction because $criteria could contain info
  1213. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1214. $con->beginTransaction();
  1215. $affectedRows += BasePeer::doDelete($criteria, $con);
  1216. CcShowInstancesPeer::clearRelatedInstancePool();
  1217. $con->commit();
  1218. return $affectedRows;
  1219. } catch (PropelException $e) {
  1220. $con->rollBack();
  1221. throw $e;
  1222. }
  1223. }
  1224. /**
  1225. * Validates all modified columns of given CcShowInstances object.
  1226. * If parameter $columns is either a single column name or an array of column names
  1227. * than only those columns are validated.
  1228. *
  1229. * NOTICE: This does not apply to primary or foreign keys for now.
  1230. *
  1231. * @param CcShowInstances $obj The object to validate.
  1232. * @param mixed $cols Column name or array of column names.
  1233. *
  1234. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
  1235. */
  1236. public static function doValidate(CcShowInstances $obj, $cols = null)
  1237. {
  1238. $columns = array();
  1239. if ($cols) {
  1240. $dbMap = Propel::getDatabaseMap(CcShowInstancesPeer::DATABASE_NAME);
  1241. $tableMap = $dbMap->getTable(CcShowInstancesPeer::TABLE_NAME);
  1242. if (! is_array($cols)) {
  1243. $cols = array($cols);
  1244. }
  1245. foreach ($cols as $colName) {
  1246. if ($tableMap->containsColumn($colName)) {
  1247. $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
  1248. $columns[$colName] = $obj->$get();
  1249. }
  1250. }
  1251. } else {
  1252. }
  1253. return BasePeer::doValidate(CcShowInstancesPeer::DATABASE_NAME, CcShowInstancesPeer::TABLE_NAME, $columns);
  1254. }
  1255. /**
  1256. * Retrieve a single object by pkey.
  1257. *
  1258. * @param int $pk the primary key.
  1259. * @param PropelPDO $con the connection to use
  1260. * @return CcShowInstances
  1261. */
  1262. public static function retrieveByPK($pk, PropelPDO $con = null)
  1263. {
  1264. if (null !== ($obj = CcShowInstancesPeer::getInstanceFromPool((string) $pk))) {
  1265. return $obj;
  1266. }
  1267. if ($con === null) {
  1268. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1269. }
  1270. $criteria = new Criteria(CcShowInstancesPeer::DATABASE_NAME);
  1271. $criteria->add(CcShowInstancesPeer::ID, $pk);
  1272. $v = CcShowInstancesPeer::doSelect($criteria, $con);
  1273. return !empty($v) > 0 ? $v[0] : null;
  1274. }
  1275. /**
  1276. * Retrieve multiple objects by pkey.
  1277. *
  1278. * @param array $pks List of primary keys
  1279. * @param PropelPDO $con the connection to use
  1280. * @throws PropelException Any exceptions caught during processing will be
  1281. * rethrown wrapped into a PropelException.
  1282. */
  1283. public static function retrieveByPKs($pks, PropelPDO $con = null)
  1284. {
  1285. if ($con === null) {
  1286. $con = Propel::getConnection(CcShowInstancesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1287. }
  1288. $objs = null;
  1289. if (empty($pks)) {
  1290. $objs = array();
  1291. } else {
  1292. $criteria = new Criteria(CcShowInstancesPeer::DATABASE_NAME);
  1293. $criteria->add(CcShowInstancesPeer::ID, $pks, Criteria::IN);
  1294. $objs = CcShowInstancesPeer::doSelect($criteria, $con);
  1295. }
  1296. return $objs;
  1297. }
  1298. } // BaseCcShowInstancesPeer
  1299. // This is the static code needed to register the TableMap for this table with the main Propel class.
  1300. //
  1301. BaseCcShowInstancesPeer::buildTableMap();