1: <?php
2:
3: namespace cli_db\propel\om;
4:
5: use \BasePeer;
6: use \Criteria;
7: use \PDO;
8: use \PDOStatement;
9: use \Propel;
10: use \PropelException;
11: use \PropelPDO;
12: use cli_db\propel\FeaturePeer;
13: use cli_db\propel\FeatureSynonym;
14: use cli_db\propel\FeatureSynonymPeer;
15: use cli_db\propel\PubPeer;
16: use cli_db\propel\SynonymPeer;
17: use cli_db\propel\map\FeatureSynonymTableMap;
18:
19: 20: 21: 22: 23: 24: 25:
26: abstract class BaseFeatureSynonymPeer
27: {
28:
29:
30: const DATABASE_NAME = 'cli_db';
31:
32:
33: const TABLE_NAME = 'feature_synonym';
34:
35:
36: const OM_CLASS = 'cli_db\\propel\\FeatureSynonym';
37:
38:
39: const TM_CLASS = 'FeatureSynonymTableMap';
40:
41:
42: const NUM_COLUMNS = 6;
43:
44:
45: const NUM_LAZY_LOAD_COLUMNS = 0;
46:
47:
48: const NUM_HYDRATE_COLUMNS = 6;
49:
50:
51: const FEATURE_SYNONYM_ID = 'feature_synonym.feature_synonym_id';
52:
53:
54: const SYNONYM_ID = 'feature_synonym.synonym_id';
55:
56:
57: const FEATURE_ID = 'feature_synonym.feature_id';
58:
59:
60: const PUB_ID = 'feature_synonym.pub_id';
61:
62:
63: const IS_CURRENT = 'feature_synonym.is_current';
64:
65:
66: const IS_INTERNAL = 'feature_synonym.is_internal';
67:
68:
69: const DEFAULT_STRING_FORMAT = 'YAML';
70:
71: 72: 73: 74: 75: 76:
77: public static $instances = array();
78:
79:
80: 81: 82: 83: 84: 85:
86: protected static $fieldNames = array (
87: BasePeer::TYPE_PHPNAME => array ('FeatureSynonymId', 'SynonymId', 'FeatureId', 'PubId', 'IsCurrent', 'IsInternal', ),
88: BasePeer::TYPE_STUDLYPHPNAME => array ('featureSynonymId', 'synonymId', 'featureId', 'pubId', 'isCurrent', 'isInternal', ),
89: BasePeer::TYPE_COLNAME => array (FeatureSynonymPeer::FEATURE_SYNONYM_ID, FeatureSynonymPeer::SYNONYM_ID, FeatureSynonymPeer::FEATURE_ID, FeatureSynonymPeer::PUB_ID, FeatureSynonymPeer::IS_CURRENT, FeatureSynonymPeer::IS_INTERNAL, ),
90: BasePeer::TYPE_RAW_COLNAME => array ('FEATURE_SYNONYM_ID', 'SYNONYM_ID', 'FEATURE_ID', 'PUB_ID', 'IS_CURRENT', 'IS_INTERNAL', ),
91: BasePeer::TYPE_FIELDNAME => array ('feature_synonym_id', 'synonym_id', 'feature_id', 'pub_id', 'is_current', 'is_internal', ),
92: BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
93: );
94:
95: 96: 97: 98: 99: 100:
101: protected static $fieldKeys = array (
102: BasePeer::TYPE_PHPNAME => array ('FeatureSynonymId' => 0, 'SynonymId' => 1, 'FeatureId' => 2, 'PubId' => 3, 'IsCurrent' => 4, 'IsInternal' => 5, ),
103: BasePeer::TYPE_STUDLYPHPNAME => array ('featureSynonymId' => 0, 'synonymId' => 1, 'featureId' => 2, 'pubId' => 3, 'isCurrent' => 4, 'isInternal' => 5, ),
104: BasePeer::TYPE_COLNAME => array (FeatureSynonymPeer::FEATURE_SYNONYM_ID => 0, FeatureSynonymPeer::SYNONYM_ID => 1, FeatureSynonymPeer::FEATURE_ID => 2, FeatureSynonymPeer::PUB_ID => 3, FeatureSynonymPeer::IS_CURRENT => 4, FeatureSynonymPeer::IS_INTERNAL => 5, ),
105: BasePeer::TYPE_RAW_COLNAME => array ('FEATURE_SYNONYM_ID' => 0, 'SYNONYM_ID' => 1, 'FEATURE_ID' => 2, 'PUB_ID' => 3, 'IS_CURRENT' => 4, 'IS_INTERNAL' => 5, ),
106: BasePeer::TYPE_FIELDNAME => array ('feature_synonym_id' => 0, 'synonym_id' => 1, 'feature_id' => 2, 'pub_id' => 3, 'is_current' => 4, 'is_internal' => 5, ),
107: BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
108: );
109:
110: 111: 112: 113: 114: 115: 116: 117: 118: 119:
120: public static function translateFieldName($name, $fromType, $toType)
121: {
122: $toNames = FeatureSynonymPeer::getFieldNames($toType);
123: $key = isset(FeatureSynonymPeer::$fieldKeys[$fromType][$name]) ? FeatureSynonymPeer::$fieldKeys[$fromType][$name] : null;
124: if ($key === null) {
125: throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(FeatureSynonymPeer::$fieldKeys[$fromType], true));
126: }
127:
128: return $toNames[$key];
129: }
130:
131: 132: 133: 134: 135: 136: 137: 138: 139:
140: public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
141: {
142: if (!array_key_exists($type, FeatureSynonymPeer::$fieldNames)) {
143: 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.');
144: }
145:
146: return FeatureSynonymPeer::$fieldNames[$type];
147: }
148:
149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160:
161: public static function alias($alias, $column)
162: {
163: return str_replace(FeatureSynonymPeer::TABLE_NAME.'.', $alias.'.', $column);
164: }
165:
166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177:
178: public static function addSelectColumns(Criteria $criteria, $alias = null)
179: {
180: if (null === $alias) {
181: $criteria->addSelectColumn(FeatureSynonymPeer::FEATURE_SYNONYM_ID);
182: $criteria->addSelectColumn(FeatureSynonymPeer::SYNONYM_ID);
183: $criteria->addSelectColumn(FeatureSynonymPeer::FEATURE_ID);
184: $criteria->addSelectColumn(FeatureSynonymPeer::PUB_ID);
185: $criteria->addSelectColumn(FeatureSynonymPeer::IS_CURRENT);
186: $criteria->addSelectColumn(FeatureSynonymPeer::IS_INTERNAL);
187: } else {
188: $criteria->addSelectColumn($alias . '.feature_synonym_id');
189: $criteria->addSelectColumn($alias . '.synonym_id');
190: $criteria->addSelectColumn($alias . '.feature_id');
191: $criteria->addSelectColumn($alias . '.pub_id');
192: $criteria->addSelectColumn($alias . '.is_current');
193: $criteria->addSelectColumn($alias . '.is_internal');
194: }
195: }
196:
197: 198: 199: 200: 201: 202: 203: 204:
205: public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
206: {
207:
208: $criteria = clone $criteria;
209:
210:
211:
212:
213: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
214:
215: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
216: $criteria->setDistinct();
217: }
218:
219: if (!$criteria->hasSelectClause()) {
220: FeatureSynonymPeer::addSelectColumns($criteria);
221: }
222:
223: $criteria->clearOrderByColumns();
224: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
225:
226: if ($con === null) {
227: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
228: }
229:
230: $stmt = BasePeer::doCount($criteria, $con);
231:
232: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
233: $count = (int) $row[0];
234: } else {
235: $count = 0;
236: }
237: $stmt->closeCursor();
238:
239: return $count;
240: }
241: 242: 243: 244: 245: 246: 247: 248: 249:
250: public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
251: {
252: $critcopy = clone $criteria;
253: $critcopy->setLimit(1);
254: $objects = FeatureSynonymPeer::doSelect($critcopy, $con);
255: if ($objects) {
256: return $objects[0];
257: }
258:
259: return null;
260: }
261: 262: 263: 264: 265: 266: 267: 268: 269:
270: public static function doSelect(Criteria $criteria, PropelPDO $con = null)
271: {
272: return FeatureSynonymPeer::populateObjects(FeatureSynonymPeer::doSelectStmt($criteria, $con));
273: }
274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286:
287: public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
288: {
289: if ($con === null) {
290: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
291: }
292:
293: if (!$criteria->hasSelectClause()) {
294: $criteria = clone $criteria;
295: FeatureSynonymPeer::addSelectColumns($criteria);
296: }
297:
298:
299: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
300:
301:
302: return BasePeer::doSelect($criteria, $con);
303: }
304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315:
316: public static function addInstanceToPool($obj, $key = null)
317: {
318: if (Propel::isInstancePoolingEnabled()) {
319: if ($key === null) {
320: $key = (string) $obj->getFeatureSynonymId();
321: }
322: FeatureSynonymPeer::$instances[$key] = $obj;
323: }
324: }
325:
326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338:
339: public static function removeInstanceFromPool($value)
340: {
341: if (Propel::isInstancePoolingEnabled() && $value !== null) {
342: if (is_object($value) && $value instanceof FeatureSynonym) {
343: $key = (string) $value->getFeatureSynonymId();
344: } elseif (is_scalar($value)) {
345:
346: $key = (string) $value;
347: } else {
348: $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or FeatureSynonym object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
349: throw $e;
350: }
351:
352: unset(FeatureSynonymPeer::$instances[$key]);
353: }
354: }
355:
356: 357: 358: 359: 360: 361: 362: 363: 364: 365:
366: public static function getInstanceFromPool($key)
367: {
368: if (Propel::isInstancePoolingEnabled()) {
369: if (isset(FeatureSynonymPeer::$instances[$key])) {
370: return FeatureSynonymPeer::$instances[$key];
371: }
372: }
373:
374: return null;
375: }
376:
377: 378: 379: 380: 381:
382: public static function clearInstancePool($and_clear_all_references = false)
383: {
384: if ($and_clear_all_references)
385: {
386: foreach (FeatureSynonymPeer::$instances as $instance)
387: {
388: $instance->clearAllReferences(true);
389: }
390: }
391: FeatureSynonymPeer::$instances = array();
392: }
393:
394: 395: 396: 397:
398: public static function clearRelatedInstancePool()
399: {
400: }
401:
402: 403: 404: 405: 406: 407: 408: 409: 410: 411:
412: public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
413: {
414:
415: if ($row[$startcol] === null) {
416: return null;
417: }
418:
419: return (string) $row[$startcol];
420: }
421:
422: 423: 424: 425: 426: 427: 428: 429: 430:
431: public static function getPrimaryKeyFromRow($row, $startcol = 0)
432: {
433:
434: return (int) $row[$startcol];
435: }
436:
437: 438: 439: 440: 441: 442: 443:
444: public static function populateObjects(PDOStatement $stmt)
445: {
446: $results = array();
447:
448:
449: $cls = FeatureSynonymPeer::getOMClass();
450:
451: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
452: $key = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
453: if (null !== ($obj = FeatureSynonymPeer::getInstanceFromPool($key))) {
454:
455:
456:
457: $results[] = $obj;
458: } else {
459: $obj = new $cls();
460: $obj->hydrate($row);
461: $results[] = $obj;
462: FeatureSynonymPeer::addInstanceToPool($obj, $key);
463: }
464: }
465: $stmt->closeCursor();
466:
467: return $results;
468: }
469: 470: 471: 472: 473: 474: 475: 476: 477:
478: public static function populateObject($row, $startcol = 0)
479: {
480: $key = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, $startcol);
481: if (null !== ($obj = FeatureSynonymPeer::getInstanceFromPool($key))) {
482:
483:
484:
485: $col = $startcol + FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
486: } else {
487: $cls = FeatureSynonymPeer::OM_CLASS;
488: $obj = new $cls();
489: $col = $obj->hydrate($row, $startcol);
490: FeatureSynonymPeer::addInstanceToPool($obj, $key);
491: }
492:
493: return array($obj, $col);
494: }
495:
496:
497: 498: 499: 500: 501: 502: 503: 504: 505:
506: public static function doCountJoinFeature(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
507: {
508:
509: $criteria = clone $criteria;
510:
511:
512:
513:
514: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
515:
516: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
517: $criteria->setDistinct();
518: }
519:
520: if (!$criteria->hasSelectClause()) {
521: FeatureSynonymPeer::addSelectColumns($criteria);
522: }
523:
524: $criteria->clearOrderByColumns();
525:
526:
527: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
528:
529: if ($con === null) {
530: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
531: }
532:
533: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
534:
535: $stmt = BasePeer::doCount($criteria, $con);
536:
537: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
538: $count = (int) $row[0];
539: } else {
540: $count = 0;
541: }
542: $stmt->closeCursor();
543:
544: return $count;
545: }
546:
547:
548: 549: 550: 551: 552: 553: 554: 555: 556:
557: public static function doCountJoinPub(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
558: {
559:
560: $criteria = clone $criteria;
561:
562:
563:
564:
565: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
566:
567: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
568: $criteria->setDistinct();
569: }
570:
571: if (!$criteria->hasSelectClause()) {
572: FeatureSynonymPeer::addSelectColumns($criteria);
573: }
574:
575: $criteria->clearOrderByColumns();
576:
577:
578: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
579:
580: if ($con === null) {
581: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
582: }
583:
584: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
585:
586: $stmt = BasePeer::doCount($criteria, $con);
587:
588: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
589: $count = (int) $row[0];
590: } else {
591: $count = 0;
592: }
593: $stmt->closeCursor();
594:
595: return $count;
596: }
597:
598:
599: 600: 601: 602: 603: 604: 605: 606: 607:
608: public static function doCountJoinSynonym(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
609: {
610:
611: $criteria = clone $criteria;
612:
613:
614:
615:
616: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
617:
618: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
619: $criteria->setDistinct();
620: }
621:
622: if (!$criteria->hasSelectClause()) {
623: FeatureSynonymPeer::addSelectColumns($criteria);
624: }
625:
626: $criteria->clearOrderByColumns();
627:
628:
629: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
630:
631: if ($con === null) {
632: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
633: }
634:
635: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
636:
637: $stmt = BasePeer::doCount($criteria, $con);
638:
639: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
640: $count = (int) $row[0];
641: } else {
642: $count = 0;
643: }
644: $stmt->closeCursor();
645:
646: return $count;
647: }
648:
649:
650: 651: 652: 653: 654: 655: 656: 657: 658:
659: public static function doSelectJoinFeature(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
660: {
661: $criteria = clone $criteria;
662:
663:
664: if ($criteria->getDbName() == Propel::getDefaultDB()) {
665: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
666: }
667:
668: FeatureSynonymPeer::addSelectColumns($criteria);
669: $startcol = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
670: FeaturePeer::addSelectColumns($criteria);
671:
672: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
673:
674: $stmt = BasePeer::doSelect($criteria, $con);
675: $results = array();
676:
677: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
678: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
679: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
680:
681:
682:
683: } else {
684:
685: $cls = FeatureSynonymPeer::getOMClass();
686:
687: $obj1 = new $cls();
688: $obj1->hydrate($row);
689: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
690: }
691:
692: $key2 = FeaturePeer::getPrimaryKeyHashFromRow($row, $startcol);
693: if ($key2 !== null) {
694: $obj2 = FeaturePeer::getInstanceFromPool($key2);
695: if (!$obj2) {
696:
697: $cls = FeaturePeer::getOMClass();
698:
699: $obj2 = new $cls();
700: $obj2->hydrate($row, $startcol);
701: FeaturePeer::addInstanceToPool($obj2, $key2);
702: }
703:
704:
705: $obj2->addFeatureSynonym($obj1);
706:
707: }
708:
709: $results[] = $obj1;
710: }
711: $stmt->closeCursor();
712:
713: return $results;
714: }
715:
716:
717: 718: 719: 720: 721: 722: 723: 724: 725:
726: public static function doSelectJoinPub(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
727: {
728: $criteria = clone $criteria;
729:
730:
731: if ($criteria->getDbName() == Propel::getDefaultDB()) {
732: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
733: }
734:
735: FeatureSynonymPeer::addSelectColumns($criteria);
736: $startcol = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
737: PubPeer::addSelectColumns($criteria);
738:
739: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
740:
741: $stmt = BasePeer::doSelect($criteria, $con);
742: $results = array();
743:
744: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
745: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
746: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
747:
748:
749:
750: } else {
751:
752: $cls = FeatureSynonymPeer::getOMClass();
753:
754: $obj1 = new $cls();
755: $obj1->hydrate($row);
756: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
757: }
758:
759: $key2 = PubPeer::getPrimaryKeyHashFromRow($row, $startcol);
760: if ($key2 !== null) {
761: $obj2 = PubPeer::getInstanceFromPool($key2);
762: if (!$obj2) {
763:
764: $cls = PubPeer::getOMClass();
765:
766: $obj2 = new $cls();
767: $obj2->hydrate($row, $startcol);
768: PubPeer::addInstanceToPool($obj2, $key2);
769: }
770:
771:
772: $obj2->addFeatureSynonym($obj1);
773:
774: }
775:
776: $results[] = $obj1;
777: }
778: $stmt->closeCursor();
779:
780: return $results;
781: }
782:
783:
784: 785: 786: 787: 788: 789: 790: 791: 792:
793: public static function doSelectJoinSynonym(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
794: {
795: $criteria = clone $criteria;
796:
797:
798: if ($criteria->getDbName() == Propel::getDefaultDB()) {
799: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
800: }
801:
802: FeatureSynonymPeer::addSelectColumns($criteria);
803: $startcol = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
804: SynonymPeer::addSelectColumns($criteria);
805:
806: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
807:
808: $stmt = BasePeer::doSelect($criteria, $con);
809: $results = array();
810:
811: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
812: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
813: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
814:
815:
816:
817: } else {
818:
819: $cls = FeatureSynonymPeer::getOMClass();
820:
821: $obj1 = new $cls();
822: $obj1->hydrate($row);
823: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
824: }
825:
826: $key2 = SynonymPeer::getPrimaryKeyHashFromRow($row, $startcol);
827: if ($key2 !== null) {
828: $obj2 = SynonymPeer::getInstanceFromPool($key2);
829: if (!$obj2) {
830:
831: $cls = SynonymPeer::getOMClass();
832:
833: $obj2 = new $cls();
834: $obj2->hydrate($row, $startcol);
835: SynonymPeer::addInstanceToPool($obj2, $key2);
836: }
837:
838:
839: $obj2->addFeatureSynonym($obj1);
840:
841: }
842:
843: $results[] = $obj1;
844: }
845: $stmt->closeCursor();
846:
847: return $results;
848: }
849:
850:
851: 852: 853: 854: 855: 856: 857: 858: 859:
860: public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
861: {
862:
863: $criteria = clone $criteria;
864:
865:
866:
867:
868: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
869:
870: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
871: $criteria->setDistinct();
872: }
873:
874: if (!$criteria->hasSelectClause()) {
875: FeatureSynonymPeer::addSelectColumns($criteria);
876: }
877:
878: $criteria->clearOrderByColumns();
879:
880:
881: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
882:
883: if ($con === null) {
884: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
885: }
886:
887: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
888:
889: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
890:
891: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
892:
893: $stmt = BasePeer::doCount($criteria, $con);
894:
895: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
896: $count = (int) $row[0];
897: } else {
898: $count = 0;
899: }
900: $stmt->closeCursor();
901:
902: return $count;
903: }
904:
905: 906: 907: 908: 909: 910: 911: 912: 913: 914:
915: public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
916: {
917: $criteria = clone $criteria;
918:
919:
920: if ($criteria->getDbName() == Propel::getDefaultDB()) {
921: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
922: }
923:
924: FeatureSynonymPeer::addSelectColumns($criteria);
925: $startcol2 = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
926:
927: FeaturePeer::addSelectColumns($criteria);
928: $startcol3 = $startcol2 + FeaturePeer::NUM_HYDRATE_COLUMNS;
929:
930: PubPeer::addSelectColumns($criteria);
931: $startcol4 = $startcol3 + PubPeer::NUM_HYDRATE_COLUMNS;
932:
933: SynonymPeer::addSelectColumns($criteria);
934: $startcol5 = $startcol4 + SynonymPeer::NUM_HYDRATE_COLUMNS;
935:
936: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
937:
938: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
939:
940: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
941:
942: $stmt = BasePeer::doSelect($criteria, $con);
943: $results = array();
944:
945: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
946: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
947: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
948:
949:
950:
951: } else {
952: $cls = FeatureSynonymPeer::getOMClass();
953:
954: $obj1 = new $cls();
955: $obj1->hydrate($row);
956: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
957: }
958:
959:
960:
961: $key2 = FeaturePeer::getPrimaryKeyHashFromRow($row, $startcol2);
962: if ($key2 !== null) {
963: $obj2 = FeaturePeer::getInstanceFromPool($key2);
964: if (!$obj2) {
965:
966: $cls = FeaturePeer::getOMClass();
967:
968: $obj2 = new $cls();
969: $obj2->hydrate($row, $startcol2);
970: FeaturePeer::addInstanceToPool($obj2, $key2);
971: }
972:
973:
974: $obj2->addFeatureSynonym($obj1);
975: }
976:
977:
978:
979: $key3 = PubPeer::getPrimaryKeyHashFromRow($row, $startcol3);
980: if ($key3 !== null) {
981: $obj3 = PubPeer::getInstanceFromPool($key3);
982: if (!$obj3) {
983:
984: $cls = PubPeer::getOMClass();
985:
986: $obj3 = new $cls();
987: $obj3->hydrate($row, $startcol3);
988: PubPeer::addInstanceToPool($obj3, $key3);
989: }
990:
991:
992: $obj3->addFeatureSynonym($obj1);
993: }
994:
995:
996:
997: $key4 = SynonymPeer::getPrimaryKeyHashFromRow($row, $startcol4);
998: if ($key4 !== null) {
999: $obj4 = SynonymPeer::getInstanceFromPool($key4);
1000: if (!$obj4) {
1001:
1002: $cls = SynonymPeer::getOMClass();
1003:
1004: $obj4 = new $cls();
1005: $obj4->hydrate($row, $startcol4);
1006: SynonymPeer::addInstanceToPool($obj4, $key4);
1007: }
1008:
1009:
1010: $obj4->addFeatureSynonym($obj1);
1011: }
1012:
1013: $results[] = $obj1;
1014: }
1015: $stmt->closeCursor();
1016:
1017: return $results;
1018: }
1019:
1020:
1021: 1022: 1023: 1024: 1025: 1026: 1027: 1028: 1029:
1030: public static function doCountJoinAllExceptFeature(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1031: {
1032:
1033: $criteria = clone $criteria;
1034:
1035:
1036:
1037:
1038: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
1039:
1040: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1041: $criteria->setDistinct();
1042: }
1043:
1044: if (!$criteria->hasSelectClause()) {
1045: FeatureSynonymPeer::addSelectColumns($criteria);
1046: }
1047:
1048: $criteria->clearOrderByColumns();
1049:
1050:
1051: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1052:
1053: if ($con === null) {
1054: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1055: }
1056:
1057: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
1058:
1059: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
1060:
1061: $stmt = BasePeer::doCount($criteria, $con);
1062:
1063: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1064: $count = (int) $row[0];
1065: } else {
1066: $count = 0;
1067: }
1068: $stmt->closeCursor();
1069:
1070: return $count;
1071: }
1072:
1073:
1074: 1075: 1076: 1077: 1078: 1079: 1080: 1081: 1082:
1083: public static function doCountJoinAllExceptPub(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1084: {
1085:
1086: $criteria = clone $criteria;
1087:
1088:
1089:
1090:
1091: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
1092:
1093: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1094: $criteria->setDistinct();
1095: }
1096:
1097: if (!$criteria->hasSelectClause()) {
1098: FeatureSynonymPeer::addSelectColumns($criteria);
1099: }
1100:
1101: $criteria->clearOrderByColumns();
1102:
1103:
1104: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1105:
1106: if ($con === null) {
1107: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1108: }
1109:
1110: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
1111:
1112: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
1113:
1114: $stmt = BasePeer::doCount($criteria, $con);
1115:
1116: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1117: $count = (int) $row[0];
1118: } else {
1119: $count = 0;
1120: }
1121: $stmt->closeCursor();
1122:
1123: return $count;
1124: }
1125:
1126:
1127: 1128: 1129: 1130: 1131: 1132: 1133: 1134: 1135:
1136: public static function doCountJoinAllExceptSynonym(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1137: {
1138:
1139: $criteria = clone $criteria;
1140:
1141:
1142:
1143:
1144: $criteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
1145:
1146: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1147: $criteria->setDistinct();
1148: }
1149:
1150: if (!$criteria->hasSelectClause()) {
1151: FeatureSynonymPeer::addSelectColumns($criteria);
1152: }
1153:
1154: $criteria->clearOrderByColumns();
1155:
1156:
1157: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1158:
1159: if ($con === null) {
1160: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1161: }
1162:
1163: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
1164:
1165: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
1166:
1167: $stmt = BasePeer::doCount($criteria, $con);
1168:
1169: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1170: $count = (int) $row[0];
1171: } else {
1172: $count = 0;
1173: }
1174: $stmt->closeCursor();
1175:
1176: return $count;
1177: }
1178:
1179:
1180: 1181: 1182: 1183: 1184: 1185: 1186: 1187: 1188: 1189:
1190: public static function doSelectJoinAllExceptFeature(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1191: {
1192: $criteria = clone $criteria;
1193:
1194:
1195:
1196:
1197: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1198: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1199: }
1200:
1201: FeatureSynonymPeer::addSelectColumns($criteria);
1202: $startcol2 = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
1203:
1204: PubPeer::addSelectColumns($criteria);
1205: $startcol3 = $startcol2 + PubPeer::NUM_HYDRATE_COLUMNS;
1206:
1207: SynonymPeer::addSelectColumns($criteria);
1208: $startcol4 = $startcol3 + SynonymPeer::NUM_HYDRATE_COLUMNS;
1209:
1210: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
1211:
1212: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
1213:
1214:
1215: $stmt = BasePeer::doSelect($criteria, $con);
1216: $results = array();
1217:
1218: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1219: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
1220: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
1221:
1222:
1223:
1224: } else {
1225: $cls = FeatureSynonymPeer::getOMClass();
1226:
1227: $obj1 = new $cls();
1228: $obj1->hydrate($row);
1229: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
1230: }
1231:
1232:
1233:
1234: $key2 = PubPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1235: if ($key2 !== null) {
1236: $obj2 = PubPeer::getInstanceFromPool($key2);
1237: if (!$obj2) {
1238:
1239: $cls = PubPeer::getOMClass();
1240:
1241: $obj2 = new $cls();
1242: $obj2->hydrate($row, $startcol2);
1243: PubPeer::addInstanceToPool($obj2, $key2);
1244: }
1245:
1246:
1247: $obj2->addFeatureSynonym($obj1);
1248:
1249: }
1250:
1251:
1252:
1253: $key3 = SynonymPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1254: if ($key3 !== null) {
1255: $obj3 = SynonymPeer::getInstanceFromPool($key3);
1256: if (!$obj3) {
1257:
1258: $cls = SynonymPeer::getOMClass();
1259:
1260: $obj3 = new $cls();
1261: $obj3->hydrate($row, $startcol3);
1262: SynonymPeer::addInstanceToPool($obj3, $key3);
1263: }
1264:
1265:
1266: $obj3->addFeatureSynonym($obj1);
1267:
1268: }
1269:
1270: $results[] = $obj1;
1271: }
1272: $stmt->closeCursor();
1273:
1274: return $results;
1275: }
1276:
1277:
1278: 1279: 1280: 1281: 1282: 1283: 1284: 1285: 1286: 1287:
1288: public static function doSelectJoinAllExceptPub(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1289: {
1290: $criteria = clone $criteria;
1291:
1292:
1293:
1294:
1295: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1296: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1297: }
1298:
1299: FeatureSynonymPeer::addSelectColumns($criteria);
1300: $startcol2 = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
1301:
1302: FeaturePeer::addSelectColumns($criteria);
1303: $startcol3 = $startcol2 + FeaturePeer::NUM_HYDRATE_COLUMNS;
1304:
1305: SynonymPeer::addSelectColumns($criteria);
1306: $startcol4 = $startcol3 + SynonymPeer::NUM_HYDRATE_COLUMNS;
1307:
1308: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
1309:
1310: $criteria->addJoin(FeatureSynonymPeer::SYNONYM_ID, SynonymPeer::SYNONYM_ID, $join_behavior);
1311:
1312:
1313: $stmt = BasePeer::doSelect($criteria, $con);
1314: $results = array();
1315:
1316: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1317: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
1318: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
1319:
1320:
1321:
1322: } else {
1323: $cls = FeatureSynonymPeer::getOMClass();
1324:
1325: $obj1 = new $cls();
1326: $obj1->hydrate($row);
1327: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
1328: }
1329:
1330:
1331:
1332: $key2 = FeaturePeer::getPrimaryKeyHashFromRow($row, $startcol2);
1333: if ($key2 !== null) {
1334: $obj2 = FeaturePeer::getInstanceFromPool($key2);
1335: if (!$obj2) {
1336:
1337: $cls = FeaturePeer::getOMClass();
1338:
1339: $obj2 = new $cls();
1340: $obj2->hydrate($row, $startcol2);
1341: FeaturePeer::addInstanceToPool($obj2, $key2);
1342: }
1343:
1344:
1345: $obj2->addFeatureSynonym($obj1);
1346:
1347: }
1348:
1349:
1350:
1351: $key3 = SynonymPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1352: if ($key3 !== null) {
1353: $obj3 = SynonymPeer::getInstanceFromPool($key3);
1354: if (!$obj3) {
1355:
1356: $cls = SynonymPeer::getOMClass();
1357:
1358: $obj3 = new $cls();
1359: $obj3->hydrate($row, $startcol3);
1360: SynonymPeer::addInstanceToPool($obj3, $key3);
1361: }
1362:
1363:
1364: $obj3->addFeatureSynonym($obj1);
1365:
1366: }
1367:
1368: $results[] = $obj1;
1369: }
1370: $stmt->closeCursor();
1371:
1372: return $results;
1373: }
1374:
1375:
1376: 1377: 1378: 1379: 1380: 1381: 1382: 1383: 1384: 1385:
1386: public static function doSelectJoinAllExceptSynonym(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1387: {
1388: $criteria = clone $criteria;
1389:
1390:
1391:
1392:
1393: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1394: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1395: }
1396:
1397: FeatureSynonymPeer::addSelectColumns($criteria);
1398: $startcol2 = FeatureSynonymPeer::NUM_HYDRATE_COLUMNS;
1399:
1400: FeaturePeer::addSelectColumns($criteria);
1401: $startcol3 = $startcol2 + FeaturePeer::NUM_HYDRATE_COLUMNS;
1402:
1403: PubPeer::addSelectColumns($criteria);
1404: $startcol4 = $startcol3 + PubPeer::NUM_HYDRATE_COLUMNS;
1405:
1406: $criteria->addJoin(FeatureSynonymPeer::FEATURE_ID, FeaturePeer::FEATURE_ID, $join_behavior);
1407:
1408: $criteria->addJoin(FeatureSynonymPeer::PUB_ID, PubPeer::PUB_ID, $join_behavior);
1409:
1410:
1411: $stmt = BasePeer::doSelect($criteria, $con);
1412: $results = array();
1413:
1414: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1415: $key1 = FeatureSynonymPeer::getPrimaryKeyHashFromRow($row, 0);
1416: if (null !== ($obj1 = FeatureSynonymPeer::getInstanceFromPool($key1))) {
1417:
1418:
1419:
1420: } else {
1421: $cls = FeatureSynonymPeer::getOMClass();
1422:
1423: $obj1 = new $cls();
1424: $obj1->hydrate($row);
1425: FeatureSynonymPeer::addInstanceToPool($obj1, $key1);
1426: }
1427:
1428:
1429:
1430: $key2 = FeaturePeer::getPrimaryKeyHashFromRow($row, $startcol2);
1431: if ($key2 !== null) {
1432: $obj2 = FeaturePeer::getInstanceFromPool($key2);
1433: if (!$obj2) {
1434:
1435: $cls = FeaturePeer::getOMClass();
1436:
1437: $obj2 = new $cls();
1438: $obj2->hydrate($row, $startcol2);
1439: FeaturePeer::addInstanceToPool($obj2, $key2);
1440: }
1441:
1442:
1443: $obj2->addFeatureSynonym($obj1);
1444:
1445: }
1446:
1447:
1448:
1449: $key3 = PubPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1450: if ($key3 !== null) {
1451: $obj3 = PubPeer::getInstanceFromPool($key3);
1452: if (!$obj3) {
1453:
1454: $cls = PubPeer::getOMClass();
1455:
1456: $obj3 = new $cls();
1457: $obj3->hydrate($row, $startcol3);
1458: PubPeer::addInstanceToPool($obj3, $key3);
1459: }
1460:
1461:
1462: $obj3->addFeatureSynonym($obj1);
1463:
1464: }
1465:
1466: $results[] = $obj1;
1467: }
1468: $stmt->closeCursor();
1469:
1470: return $results;
1471: }
1472:
1473: 1474: 1475: 1476: 1477: 1478: 1479:
1480: public static function getTableMap()
1481: {
1482: return Propel::getDatabaseMap(FeatureSynonymPeer::DATABASE_NAME)->getTable(FeatureSynonymPeer::TABLE_NAME);
1483: }
1484:
1485: 1486: 1487:
1488: public static function buildTableMap()
1489: {
1490: $dbMap = Propel::getDatabaseMap(BaseFeatureSynonymPeer::DATABASE_NAME);
1491: if (!$dbMap->hasTable(BaseFeatureSynonymPeer::TABLE_NAME)) {
1492: $dbMap->addTableObject(new FeatureSynonymTableMap());
1493: }
1494: }
1495:
1496: 1497: 1498: 1499: 1500: 1501:
1502: public static function getOMClass($row = 0, $colnum = 0)
1503: {
1504: return FeatureSynonymPeer::OM_CLASS;
1505: }
1506:
1507: 1508: 1509: 1510: 1511: 1512: 1513: 1514: 1515:
1516: public static function doInsert($values, PropelPDO $con = null)
1517: {
1518: if ($con === null) {
1519: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1520: }
1521:
1522: if ($values instanceof Criteria) {
1523: $criteria = clone $values;
1524: } else {
1525: $criteria = $values->buildCriteria();
1526: }
1527:
1528: if ($criteria->containsKey(FeatureSynonymPeer::FEATURE_SYNONYM_ID) && $criteria->keyContainsValue(FeatureSynonymPeer::FEATURE_SYNONYM_ID) ) {
1529: throw new PropelException('Cannot insert a value for auto-increment primary key ('.FeatureSynonymPeer::FEATURE_SYNONYM_ID.')');
1530: }
1531:
1532:
1533:
1534: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1535:
1536: try {
1537:
1538:
1539: $con->beginTransaction();
1540: $pk = BasePeer::doInsert($criteria, $con);
1541: $con->commit();
1542: } catch (PropelException $e) {
1543: $con->rollBack();
1544: throw $e;
1545: }
1546:
1547: return $pk;
1548: }
1549:
1550: 1551: 1552: 1553: 1554: 1555: 1556: 1557: 1558:
1559: public static function doUpdate($values, PropelPDO $con = null)
1560: {
1561: if ($con === null) {
1562: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1563: }
1564:
1565: $selectCriteria = new Criteria(FeatureSynonymPeer::DATABASE_NAME);
1566:
1567: if ($values instanceof Criteria) {
1568: $criteria = clone $values;
1569:
1570: $comparison = $criteria->getComparison(FeatureSynonymPeer::FEATURE_SYNONYM_ID);
1571: $value = $criteria->remove(FeatureSynonymPeer::FEATURE_SYNONYM_ID);
1572: if ($value) {
1573: $selectCriteria->add(FeatureSynonymPeer::FEATURE_SYNONYM_ID, $value, $comparison);
1574: } else {
1575: $selectCriteria->setPrimaryTableName(FeatureSynonymPeer::TABLE_NAME);
1576: }
1577:
1578: } else {
1579: $criteria = $values->buildCriteria();
1580: $selectCriteria = $values->buildPkeyCriteria();
1581: }
1582:
1583:
1584: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1585:
1586: return BasePeer::doUpdate($selectCriteria, $criteria, $con);
1587: }
1588:
1589: 1590: 1591: 1592: 1593: 1594: 1595:
1596: public static function doDeleteAll(PropelPDO $con = null)
1597: {
1598: if ($con === null) {
1599: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1600: }
1601: $affectedRows = 0;
1602: try {
1603:
1604:
1605: $con->beginTransaction();
1606: $affectedRows += BasePeer::doDeleteAll(FeatureSynonymPeer::TABLE_NAME, $con, FeatureSynonymPeer::DATABASE_NAME);
1607:
1608:
1609:
1610: FeatureSynonymPeer::clearInstancePool();
1611: FeatureSynonymPeer::clearRelatedInstancePool();
1612: $con->commit();
1613:
1614: return $affectedRows;
1615: } catch (PropelException $e) {
1616: $con->rollBack();
1617: throw $e;
1618: }
1619: }
1620:
1621: 1622: 1623: 1624: 1625: 1626: 1627: 1628: 1629: 1630: 1631:
1632: public static function doDelete($values, PropelPDO $con = null)
1633: {
1634: if ($con === null) {
1635: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1636: }
1637:
1638: if ($values instanceof Criteria) {
1639:
1640:
1641:
1642: FeatureSynonymPeer::clearInstancePool();
1643:
1644: $criteria = clone $values;
1645: } elseif ($values instanceof FeatureSynonym) {
1646:
1647: FeatureSynonymPeer::removeInstanceFromPool($values);
1648:
1649: $criteria = $values->buildPkeyCriteria();
1650: } else {
1651: $criteria = new Criteria(FeatureSynonymPeer::DATABASE_NAME);
1652: $criteria->add(FeatureSynonymPeer::FEATURE_SYNONYM_ID, (array) $values, Criteria::IN);
1653:
1654: foreach ((array) $values as $singleval) {
1655: FeatureSynonymPeer::removeInstanceFromPool($singleval);
1656: }
1657: }
1658:
1659:
1660: $criteria->setDbName(FeatureSynonymPeer::DATABASE_NAME);
1661:
1662: $affectedRows = 0;
1663:
1664: try {
1665:
1666:
1667: $con->beginTransaction();
1668:
1669: $affectedRows += BasePeer::doDelete($criteria, $con);
1670: FeatureSynonymPeer::clearRelatedInstancePool();
1671: $con->commit();
1672:
1673: return $affectedRows;
1674: } catch (PropelException $e) {
1675: $con->rollBack();
1676: throw $e;
1677: }
1678: }
1679:
1680: 1681: 1682: 1683: 1684: 1685: 1686: 1687: 1688: 1689: 1690: 1691:
1692: public static function doValidate($obj, $cols = null)
1693: {
1694: $columns = array();
1695:
1696: if ($cols) {
1697: $dbMap = Propel::getDatabaseMap(FeatureSynonymPeer::DATABASE_NAME);
1698: $tableMap = $dbMap->getTable(FeatureSynonymPeer::TABLE_NAME);
1699:
1700: if (! is_array($cols)) {
1701: $cols = array($cols);
1702: }
1703:
1704: foreach ($cols as $colName) {
1705: if ($tableMap->hasColumn($colName)) {
1706: $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
1707: $columns[$colName] = $obj->$get();
1708: }
1709: }
1710: } else {
1711:
1712: }
1713:
1714: return BasePeer::doValidate(FeatureSynonymPeer::DATABASE_NAME, FeatureSynonymPeer::TABLE_NAME, $columns);
1715: }
1716:
1717: 1718: 1719: 1720: 1721: 1722: 1723:
1724: public static function retrieveByPK($pk, PropelPDO $con = null)
1725: {
1726:
1727: if (null !== ($obj = FeatureSynonymPeer::getInstanceFromPool((string) $pk))) {
1728: return $obj;
1729: }
1730:
1731: if ($con === null) {
1732: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1733: }
1734:
1735: $criteria = new Criteria(FeatureSynonymPeer::DATABASE_NAME);
1736: $criteria->add(FeatureSynonymPeer::FEATURE_SYNONYM_ID, $pk);
1737:
1738: $v = FeatureSynonymPeer::doSelect($criteria, $con);
1739:
1740: return !empty($v) > 0 ? $v[0] : null;
1741: }
1742:
1743: 1744: 1745: 1746: 1747: 1748: 1749: 1750: 1751:
1752: public static function retrieveByPKs($pks, PropelPDO $con = null)
1753: {
1754: if ($con === null) {
1755: $con = Propel::getConnection(FeatureSynonymPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1756: }
1757:
1758: $objs = null;
1759: if (empty($pks)) {
1760: $objs = array();
1761: } else {
1762: $criteria = new Criteria(FeatureSynonymPeer::DATABASE_NAME);
1763: $criteria->add(FeatureSynonymPeer::FEATURE_SYNONYM_ID, $pks, Criteria::IN);
1764: $objs = FeatureSynonymPeer::doSelect($criteria, $con);
1765: }
1766:
1767: return $objs;
1768: }
1769:
1770: }
1771:
1772:
1773:
1774: BaseFeatureSynonymPeer::buildTableMap();
1775:
1776: