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\AcquisitionPeer;
13: use cli_db\propel\AnalysisPeer;
14: use cli_db\propel\ContactPeer;
15: use cli_db\propel\ProtocolPeer;
16: use cli_db\propel\Quantification;
17: use cli_db\propel\QuantificationPeer;
18: use cli_db\propel\map\QuantificationTableMap;
19:
20: 21: 22: 23: 24: 25: 26:
27: abstract class BaseQuantificationPeer
28: {
29:
30:
31: const DATABASE_NAME = 'cli_db';
32:
33:
34: const TABLE_NAME = 'quantification';
35:
36:
37: const OM_CLASS = 'cli_db\\propel\\Quantification';
38:
39:
40: const TM_CLASS = 'QuantificationTableMap';
41:
42:
43: const NUM_COLUMNS = 8;
44:
45:
46: const NUM_LAZY_LOAD_COLUMNS = 0;
47:
48:
49: const NUM_HYDRATE_COLUMNS = 8;
50:
51:
52: const QUANTIFICATION_ID = 'quantification.quantification_id';
53:
54:
55: const ACQUISITION_ID = 'quantification.acquisition_id';
56:
57:
58: const OPERATOR_ID = 'quantification.operator_id';
59:
60:
61: const PROTOCOL_ID = 'quantification.protocol_id';
62:
63:
64: const ANALYSIS_ID = 'quantification.analysis_id';
65:
66:
67: const QUANTIFICATIONDATE = 'quantification.quantificationdate';
68:
69:
70: const NAME = 'quantification.name';
71:
72:
73: const URI = 'quantification.uri';
74:
75:
76: const DEFAULT_STRING_FORMAT = 'YAML';
77:
78: 79: 80: 81: 82: 83:
84: public static $instances = array();
85:
86:
87: 88: 89: 90: 91: 92:
93: protected static $fieldNames = array (
94: BasePeer::TYPE_PHPNAME => array ('QuantificationId', 'AcquisitionId', 'OperatorId', 'ProtocolId', 'AnalysisId', 'Quantificationdate', 'Name', 'Uri', ),
95: BasePeer::TYPE_STUDLYPHPNAME => array ('quantificationId', 'acquisitionId', 'operatorId', 'protocolId', 'analysisId', 'quantificationdate', 'name', 'uri', ),
96: BasePeer::TYPE_COLNAME => array (QuantificationPeer::QUANTIFICATION_ID, QuantificationPeer::ACQUISITION_ID, QuantificationPeer::OPERATOR_ID, QuantificationPeer::PROTOCOL_ID, QuantificationPeer::ANALYSIS_ID, QuantificationPeer::QUANTIFICATIONDATE, QuantificationPeer::NAME, QuantificationPeer::URI, ),
97: BasePeer::TYPE_RAW_COLNAME => array ('QUANTIFICATION_ID', 'ACQUISITION_ID', 'OPERATOR_ID', 'PROTOCOL_ID', 'ANALYSIS_ID', 'QUANTIFICATIONDATE', 'NAME', 'URI', ),
98: BasePeer::TYPE_FIELDNAME => array ('quantification_id', 'acquisition_id', 'operator_id', 'protocol_id', 'analysis_id', 'quantificationdate', 'name', 'uri', ),
99: BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
100: );
101:
102: 103: 104: 105: 106: 107:
108: protected static $fieldKeys = array (
109: BasePeer::TYPE_PHPNAME => array ('QuantificationId' => 0, 'AcquisitionId' => 1, 'OperatorId' => 2, 'ProtocolId' => 3, 'AnalysisId' => 4, 'Quantificationdate' => 5, 'Name' => 6, 'Uri' => 7, ),
110: BasePeer::TYPE_STUDLYPHPNAME => array ('quantificationId' => 0, 'acquisitionId' => 1, 'operatorId' => 2, 'protocolId' => 3, 'analysisId' => 4, 'quantificationdate' => 5, 'name' => 6, 'uri' => 7, ),
111: BasePeer::TYPE_COLNAME => array (QuantificationPeer::QUANTIFICATION_ID => 0, QuantificationPeer::ACQUISITION_ID => 1, QuantificationPeer::OPERATOR_ID => 2, QuantificationPeer::PROTOCOL_ID => 3, QuantificationPeer::ANALYSIS_ID => 4, QuantificationPeer::QUANTIFICATIONDATE => 5, QuantificationPeer::NAME => 6, QuantificationPeer::URI => 7, ),
112: BasePeer::TYPE_RAW_COLNAME => array ('QUANTIFICATION_ID' => 0, 'ACQUISITION_ID' => 1, 'OPERATOR_ID' => 2, 'PROTOCOL_ID' => 3, 'ANALYSIS_ID' => 4, 'QUANTIFICATIONDATE' => 5, 'NAME' => 6, 'URI' => 7, ),
113: BasePeer::TYPE_FIELDNAME => array ('quantification_id' => 0, 'acquisition_id' => 1, 'operator_id' => 2, 'protocol_id' => 3, 'analysis_id' => 4, 'quantificationdate' => 5, 'name' => 6, 'uri' => 7, ),
114: BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
115: );
116:
117: 118: 119: 120: 121: 122: 123: 124: 125: 126:
127: public static function translateFieldName($name, $fromType, $toType)
128: {
129: $toNames = QuantificationPeer::getFieldNames($toType);
130: $key = isset(QuantificationPeer::$fieldKeys[$fromType][$name]) ? QuantificationPeer::$fieldKeys[$fromType][$name] : null;
131: if ($key === null) {
132: throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(QuantificationPeer::$fieldKeys[$fromType], true));
133: }
134:
135: return $toNames[$key];
136: }
137:
138: 139: 140: 141: 142: 143: 144: 145: 146:
147: public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
148: {
149: if (!array_key_exists($type, QuantificationPeer::$fieldNames)) {
150: 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.');
151: }
152:
153: return QuantificationPeer::$fieldNames[$type];
154: }
155:
156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167:
168: public static function alias($alias, $column)
169: {
170: return str_replace(QuantificationPeer::TABLE_NAME.'.', $alias.'.', $column);
171: }
172:
173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184:
185: public static function addSelectColumns(Criteria $criteria, $alias = null)
186: {
187: if (null === $alias) {
188: $criteria->addSelectColumn(QuantificationPeer::QUANTIFICATION_ID);
189: $criteria->addSelectColumn(QuantificationPeer::ACQUISITION_ID);
190: $criteria->addSelectColumn(QuantificationPeer::OPERATOR_ID);
191: $criteria->addSelectColumn(QuantificationPeer::PROTOCOL_ID);
192: $criteria->addSelectColumn(QuantificationPeer::ANALYSIS_ID);
193: $criteria->addSelectColumn(QuantificationPeer::QUANTIFICATIONDATE);
194: $criteria->addSelectColumn(QuantificationPeer::NAME);
195: $criteria->addSelectColumn(QuantificationPeer::URI);
196: } else {
197: $criteria->addSelectColumn($alias . '.quantification_id');
198: $criteria->addSelectColumn($alias . '.acquisition_id');
199: $criteria->addSelectColumn($alias . '.operator_id');
200: $criteria->addSelectColumn($alias . '.protocol_id');
201: $criteria->addSelectColumn($alias . '.analysis_id');
202: $criteria->addSelectColumn($alias . '.quantificationdate');
203: $criteria->addSelectColumn($alias . '.name');
204: $criteria->addSelectColumn($alias . '.uri');
205: }
206: }
207:
208: 209: 210: 211: 212: 213: 214: 215:
216: public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
217: {
218:
219: $criteria = clone $criteria;
220:
221:
222:
223:
224: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
225:
226: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
227: $criteria->setDistinct();
228: }
229:
230: if (!$criteria->hasSelectClause()) {
231: QuantificationPeer::addSelectColumns($criteria);
232: }
233:
234: $criteria->clearOrderByColumns();
235: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
236:
237: if ($con === null) {
238: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
239: }
240:
241: $stmt = BasePeer::doCount($criteria, $con);
242:
243: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
244: $count = (int) $row[0];
245: } else {
246: $count = 0;
247: }
248: $stmt->closeCursor();
249:
250: return $count;
251: }
252: 253: 254: 255: 256: 257: 258: 259: 260:
261: public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
262: {
263: $critcopy = clone $criteria;
264: $critcopy->setLimit(1);
265: $objects = QuantificationPeer::doSelect($critcopy, $con);
266: if ($objects) {
267: return $objects[0];
268: }
269:
270: return null;
271: }
272: 273: 274: 275: 276: 277: 278: 279: 280:
281: public static function doSelect(Criteria $criteria, PropelPDO $con = null)
282: {
283: return QuantificationPeer::populateObjects(QuantificationPeer::doSelectStmt($criteria, $con));
284: }
285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297:
298: public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
299: {
300: if ($con === null) {
301: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
302: }
303:
304: if (!$criteria->hasSelectClause()) {
305: $criteria = clone $criteria;
306: QuantificationPeer::addSelectColumns($criteria);
307: }
308:
309:
310: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
311:
312:
313: return BasePeer::doSelect($criteria, $con);
314: }
315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326:
327: public static function addInstanceToPool($obj, $key = null)
328: {
329: if (Propel::isInstancePoolingEnabled()) {
330: if ($key === null) {
331: $key = (string) $obj->getQuantificationId();
332: }
333: QuantificationPeer::$instances[$key] = $obj;
334: }
335: }
336:
337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349:
350: public static function removeInstanceFromPool($value)
351: {
352: if (Propel::isInstancePoolingEnabled() && $value !== null) {
353: if (is_object($value) && $value instanceof Quantification) {
354: $key = (string) $value->getQuantificationId();
355: } elseif (is_scalar($value)) {
356:
357: $key = (string) $value;
358: } else {
359: $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or Quantification object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
360: throw $e;
361: }
362:
363: unset(QuantificationPeer::$instances[$key]);
364: }
365: }
366:
367: 368: 369: 370: 371: 372: 373: 374: 375: 376:
377: public static function getInstanceFromPool($key)
378: {
379: if (Propel::isInstancePoolingEnabled()) {
380: if (isset(QuantificationPeer::$instances[$key])) {
381: return QuantificationPeer::$instances[$key];
382: }
383: }
384:
385: return null;
386: }
387:
388: 389: 390: 391: 392:
393: public static function clearInstancePool($and_clear_all_references = false)
394: {
395: if ($and_clear_all_references)
396: {
397: foreach (QuantificationPeer::$instances as $instance)
398: {
399: $instance->clearAllReferences(true);
400: }
401: }
402: QuantificationPeer::$instances = array();
403: }
404:
405: 406: 407: 408:
409: public static function clearRelatedInstancePool()
410: {
411: }
412:
413: 414: 415: 416: 417: 418: 419: 420: 421: 422:
423: public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
424: {
425:
426: if ($row[$startcol] === null) {
427: return null;
428: }
429:
430: return (string) $row[$startcol];
431: }
432:
433: 434: 435: 436: 437: 438: 439: 440: 441:
442: public static function getPrimaryKeyFromRow($row, $startcol = 0)
443: {
444:
445: return (int) $row[$startcol];
446: }
447:
448: 449: 450: 451: 452: 453: 454:
455: public static function populateObjects(PDOStatement $stmt)
456: {
457: $results = array();
458:
459:
460: $cls = QuantificationPeer::getOMClass();
461:
462: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
463: $key = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
464: if (null !== ($obj = QuantificationPeer::getInstanceFromPool($key))) {
465:
466:
467:
468: $results[] = $obj;
469: } else {
470: $obj = new $cls();
471: $obj->hydrate($row);
472: $results[] = $obj;
473: QuantificationPeer::addInstanceToPool($obj, $key);
474: }
475: }
476: $stmt->closeCursor();
477:
478: return $results;
479: }
480: 481: 482: 483: 484: 485: 486: 487: 488:
489: public static function populateObject($row, $startcol = 0)
490: {
491: $key = QuantificationPeer::getPrimaryKeyHashFromRow($row, $startcol);
492: if (null !== ($obj = QuantificationPeer::getInstanceFromPool($key))) {
493:
494:
495:
496: $col = $startcol + QuantificationPeer::NUM_HYDRATE_COLUMNS;
497: } else {
498: $cls = QuantificationPeer::OM_CLASS;
499: $obj = new $cls();
500: $col = $obj->hydrate($row, $startcol);
501: QuantificationPeer::addInstanceToPool($obj, $key);
502: }
503:
504: return array($obj, $col);
505: }
506:
507:
508: 509: 510: 511: 512: 513: 514: 515: 516:
517: public static function doCountJoinAcquisition(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
518: {
519:
520: $criteria = clone $criteria;
521:
522:
523:
524:
525: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
526:
527: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
528: $criteria->setDistinct();
529: }
530:
531: if (!$criteria->hasSelectClause()) {
532: QuantificationPeer::addSelectColumns($criteria);
533: }
534:
535: $criteria->clearOrderByColumns();
536:
537:
538: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
539:
540: if ($con === null) {
541: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
542: }
543:
544: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
545:
546: $stmt = BasePeer::doCount($criteria, $con);
547:
548: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
549: $count = (int) $row[0];
550: } else {
551: $count = 0;
552: }
553: $stmt->closeCursor();
554:
555: return $count;
556: }
557:
558:
559: 560: 561: 562: 563: 564: 565: 566: 567:
568: public static function doCountJoinAnalysis(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
569: {
570:
571: $criteria = clone $criteria;
572:
573:
574:
575:
576: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
577:
578: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
579: $criteria->setDistinct();
580: }
581:
582: if (!$criteria->hasSelectClause()) {
583: QuantificationPeer::addSelectColumns($criteria);
584: }
585:
586: $criteria->clearOrderByColumns();
587:
588:
589: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
590:
591: if ($con === null) {
592: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
593: }
594:
595: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
596:
597: $stmt = BasePeer::doCount($criteria, $con);
598:
599: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
600: $count = (int) $row[0];
601: } else {
602: $count = 0;
603: }
604: $stmt->closeCursor();
605:
606: return $count;
607: }
608:
609:
610: 611: 612: 613: 614: 615: 616: 617: 618:
619: public static function doCountJoinContact(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
620: {
621:
622: $criteria = clone $criteria;
623:
624:
625:
626:
627: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
628:
629: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
630: $criteria->setDistinct();
631: }
632:
633: if (!$criteria->hasSelectClause()) {
634: QuantificationPeer::addSelectColumns($criteria);
635: }
636:
637: $criteria->clearOrderByColumns();
638:
639:
640: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
641:
642: if ($con === null) {
643: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
644: }
645:
646: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
647:
648: $stmt = BasePeer::doCount($criteria, $con);
649:
650: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
651: $count = (int) $row[0];
652: } else {
653: $count = 0;
654: }
655: $stmt->closeCursor();
656:
657: return $count;
658: }
659:
660:
661: 662: 663: 664: 665: 666: 667: 668: 669:
670: public static function doCountJoinProtocol(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
671: {
672:
673: $criteria = clone $criteria;
674:
675:
676:
677:
678: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
679:
680: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
681: $criteria->setDistinct();
682: }
683:
684: if (!$criteria->hasSelectClause()) {
685: QuantificationPeer::addSelectColumns($criteria);
686: }
687:
688: $criteria->clearOrderByColumns();
689:
690:
691: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
692:
693: if ($con === null) {
694: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
695: }
696:
697: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
698:
699: $stmt = BasePeer::doCount($criteria, $con);
700:
701: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
702: $count = (int) $row[0];
703: } else {
704: $count = 0;
705: }
706: $stmt->closeCursor();
707:
708: return $count;
709: }
710:
711:
712: 713: 714: 715: 716: 717: 718: 719: 720:
721: public static function doSelectJoinAcquisition(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
722: {
723: $criteria = clone $criteria;
724:
725:
726: if ($criteria->getDbName() == Propel::getDefaultDB()) {
727: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
728: }
729:
730: QuantificationPeer::addSelectColumns($criteria);
731: $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
732: AcquisitionPeer::addSelectColumns($criteria);
733:
734: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
735:
736: $stmt = BasePeer::doSelect($criteria, $con);
737: $results = array();
738:
739: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
740: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
741: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
742:
743:
744:
745: } else {
746:
747: $cls = QuantificationPeer::getOMClass();
748:
749: $obj1 = new $cls();
750: $obj1->hydrate($row);
751: QuantificationPeer::addInstanceToPool($obj1, $key1);
752: }
753:
754: $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol);
755: if ($key2 !== null) {
756: $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
757: if (!$obj2) {
758:
759: $cls = AcquisitionPeer::getOMClass();
760:
761: $obj2 = new $cls();
762: $obj2->hydrate($row, $startcol);
763: AcquisitionPeer::addInstanceToPool($obj2, $key2);
764: }
765:
766:
767: $obj2->addQuantification($obj1);
768:
769: }
770:
771: $results[] = $obj1;
772: }
773: $stmt->closeCursor();
774:
775: return $results;
776: }
777:
778:
779: 780: 781: 782: 783: 784: 785: 786: 787:
788: public static function doSelectJoinAnalysis(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
789: {
790: $criteria = clone $criteria;
791:
792:
793: if ($criteria->getDbName() == Propel::getDefaultDB()) {
794: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
795: }
796:
797: QuantificationPeer::addSelectColumns($criteria);
798: $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
799: AnalysisPeer::addSelectColumns($criteria);
800:
801: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
802:
803: $stmt = BasePeer::doSelect($criteria, $con);
804: $results = array();
805:
806: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
807: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
808: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
809:
810:
811:
812: } else {
813:
814: $cls = QuantificationPeer::getOMClass();
815:
816: $obj1 = new $cls();
817: $obj1->hydrate($row);
818: QuantificationPeer::addInstanceToPool($obj1, $key1);
819: }
820:
821: $key2 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol);
822: if ($key2 !== null) {
823: $obj2 = AnalysisPeer::getInstanceFromPool($key2);
824: if (!$obj2) {
825:
826: $cls = AnalysisPeer::getOMClass();
827:
828: $obj2 = new $cls();
829: $obj2->hydrate($row, $startcol);
830: AnalysisPeer::addInstanceToPool($obj2, $key2);
831: }
832:
833:
834: $obj2->addQuantification($obj1);
835:
836: }
837:
838: $results[] = $obj1;
839: }
840: $stmt->closeCursor();
841:
842: return $results;
843: }
844:
845:
846: 847: 848: 849: 850: 851: 852: 853: 854:
855: public static function doSelectJoinContact(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
856: {
857: $criteria = clone $criteria;
858:
859:
860: if ($criteria->getDbName() == Propel::getDefaultDB()) {
861: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
862: }
863:
864: QuantificationPeer::addSelectColumns($criteria);
865: $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
866: ContactPeer::addSelectColumns($criteria);
867:
868: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
869:
870: $stmt = BasePeer::doSelect($criteria, $con);
871: $results = array();
872:
873: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
874: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
875: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
876:
877:
878:
879: } else {
880:
881: $cls = QuantificationPeer::getOMClass();
882:
883: $obj1 = new $cls();
884: $obj1->hydrate($row);
885: QuantificationPeer::addInstanceToPool($obj1, $key1);
886: }
887:
888: $key2 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol);
889: if ($key2 !== null) {
890: $obj2 = ContactPeer::getInstanceFromPool($key2);
891: if (!$obj2) {
892:
893: $cls = ContactPeer::getOMClass();
894:
895: $obj2 = new $cls();
896: $obj2->hydrate($row, $startcol);
897: ContactPeer::addInstanceToPool($obj2, $key2);
898: }
899:
900:
901: $obj2->addQuantification($obj1);
902:
903: }
904:
905: $results[] = $obj1;
906: }
907: $stmt->closeCursor();
908:
909: return $results;
910: }
911:
912:
913: 914: 915: 916: 917: 918: 919: 920: 921:
922: public static function doSelectJoinProtocol(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
923: {
924: $criteria = clone $criteria;
925:
926:
927: if ($criteria->getDbName() == Propel::getDefaultDB()) {
928: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
929: }
930:
931: QuantificationPeer::addSelectColumns($criteria);
932: $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
933: ProtocolPeer::addSelectColumns($criteria);
934:
935: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
936:
937: $stmt = BasePeer::doSelect($criteria, $con);
938: $results = array();
939:
940: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
941: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
942: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
943:
944:
945:
946: } else {
947:
948: $cls = QuantificationPeer::getOMClass();
949:
950: $obj1 = new $cls();
951: $obj1->hydrate($row);
952: QuantificationPeer::addInstanceToPool($obj1, $key1);
953: }
954:
955: $key2 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol);
956: if ($key2 !== null) {
957: $obj2 = ProtocolPeer::getInstanceFromPool($key2);
958: if (!$obj2) {
959:
960: $cls = ProtocolPeer::getOMClass();
961:
962: $obj2 = new $cls();
963: $obj2->hydrate($row, $startcol);
964: ProtocolPeer::addInstanceToPool($obj2, $key2);
965: }
966:
967:
968: $obj2->addQuantification($obj1);
969:
970: }
971:
972: $results[] = $obj1;
973: }
974: $stmt->closeCursor();
975:
976: return $results;
977: }
978:
979:
980: 981: 982: 983: 984: 985: 986: 987: 988:
989: public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
990: {
991:
992: $criteria = clone $criteria;
993:
994:
995:
996:
997: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
998:
999: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1000: $criteria->setDistinct();
1001: }
1002:
1003: if (!$criteria->hasSelectClause()) {
1004: QuantificationPeer::addSelectColumns($criteria);
1005: }
1006:
1007: $criteria->clearOrderByColumns();
1008:
1009:
1010: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1011:
1012: if ($con === null) {
1013: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1014: }
1015:
1016: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1017:
1018: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1019:
1020: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1021:
1022: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1023:
1024: $stmt = BasePeer::doCount($criteria, $con);
1025:
1026: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1027: $count = (int) $row[0];
1028: } else {
1029: $count = 0;
1030: }
1031: $stmt->closeCursor();
1032:
1033: return $count;
1034: }
1035:
1036: 1037: 1038: 1039: 1040: 1041: 1042: 1043: 1044: 1045:
1046: public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1047: {
1048: $criteria = clone $criteria;
1049:
1050:
1051: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1052: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1053: }
1054:
1055: QuantificationPeer::addSelectColumns($criteria);
1056: $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1057:
1058: AcquisitionPeer::addSelectColumns($criteria);
1059: $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1060:
1061: AnalysisPeer::addSelectColumns($criteria);
1062: $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1063:
1064: ContactPeer::addSelectColumns($criteria);
1065: $startcol5 = $startcol4 + ContactPeer::NUM_HYDRATE_COLUMNS;
1066:
1067: ProtocolPeer::addSelectColumns($criteria);
1068: $startcol6 = $startcol5 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1069:
1070: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1071:
1072: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1073:
1074: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1075:
1076: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1077:
1078: $stmt = BasePeer::doSelect($criteria, $con);
1079: $results = array();
1080:
1081: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1082: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1083: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1084:
1085:
1086:
1087: } else {
1088: $cls = QuantificationPeer::getOMClass();
1089:
1090: $obj1 = new $cls();
1091: $obj1->hydrate($row);
1092: QuantificationPeer::addInstanceToPool($obj1, $key1);
1093: }
1094:
1095:
1096:
1097: $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1098: if ($key2 !== null) {
1099: $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1100: if (!$obj2) {
1101:
1102: $cls = AcquisitionPeer::getOMClass();
1103:
1104: $obj2 = new $cls();
1105: $obj2->hydrate($row, $startcol2);
1106: AcquisitionPeer::addInstanceToPool($obj2, $key2);
1107: }
1108:
1109:
1110: $obj2->addQuantification($obj1);
1111: }
1112:
1113:
1114:
1115: $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1116: if ($key3 !== null) {
1117: $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1118: if (!$obj3) {
1119:
1120: $cls = AnalysisPeer::getOMClass();
1121:
1122: $obj3 = new $cls();
1123: $obj3->hydrate($row, $startcol3);
1124: AnalysisPeer::addInstanceToPool($obj3, $key3);
1125: }
1126:
1127:
1128: $obj3->addQuantification($obj1);
1129: }
1130:
1131:
1132:
1133: $key4 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1134: if ($key4 !== null) {
1135: $obj4 = ContactPeer::getInstanceFromPool($key4);
1136: if (!$obj4) {
1137:
1138: $cls = ContactPeer::getOMClass();
1139:
1140: $obj4 = new $cls();
1141: $obj4->hydrate($row, $startcol4);
1142: ContactPeer::addInstanceToPool($obj4, $key4);
1143: }
1144:
1145:
1146: $obj4->addQuantification($obj1);
1147: }
1148:
1149:
1150:
1151: $key5 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol5);
1152: if ($key5 !== null) {
1153: $obj5 = ProtocolPeer::getInstanceFromPool($key5);
1154: if (!$obj5) {
1155:
1156: $cls = ProtocolPeer::getOMClass();
1157:
1158: $obj5 = new $cls();
1159: $obj5->hydrate($row, $startcol5);
1160: ProtocolPeer::addInstanceToPool($obj5, $key5);
1161: }
1162:
1163:
1164: $obj5->addQuantification($obj1);
1165: }
1166:
1167: $results[] = $obj1;
1168: }
1169: $stmt->closeCursor();
1170:
1171: return $results;
1172: }
1173:
1174:
1175: 1176: 1177: 1178: 1179: 1180: 1181: 1182: 1183:
1184: public static function doCountJoinAllExceptAcquisition(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1185: {
1186:
1187: $criteria = clone $criteria;
1188:
1189:
1190:
1191:
1192: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1193:
1194: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1195: $criteria->setDistinct();
1196: }
1197:
1198: if (!$criteria->hasSelectClause()) {
1199: QuantificationPeer::addSelectColumns($criteria);
1200: }
1201:
1202: $criteria->clearOrderByColumns();
1203:
1204:
1205: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1206:
1207: if ($con === null) {
1208: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1209: }
1210:
1211: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1212:
1213: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1214:
1215: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1216:
1217: $stmt = BasePeer::doCount($criteria, $con);
1218:
1219: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1220: $count = (int) $row[0];
1221: } else {
1222: $count = 0;
1223: }
1224: $stmt->closeCursor();
1225:
1226: return $count;
1227: }
1228:
1229:
1230: 1231: 1232: 1233: 1234: 1235: 1236: 1237: 1238:
1239: public static function doCountJoinAllExceptAnalysis(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1240: {
1241:
1242: $criteria = clone $criteria;
1243:
1244:
1245:
1246:
1247: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1248:
1249: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1250: $criteria->setDistinct();
1251: }
1252:
1253: if (!$criteria->hasSelectClause()) {
1254: QuantificationPeer::addSelectColumns($criteria);
1255: }
1256:
1257: $criteria->clearOrderByColumns();
1258:
1259:
1260: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1261:
1262: if ($con === null) {
1263: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1264: }
1265:
1266: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1267:
1268: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1269:
1270: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1271:
1272: $stmt = BasePeer::doCount($criteria, $con);
1273:
1274: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1275: $count = (int) $row[0];
1276: } else {
1277: $count = 0;
1278: }
1279: $stmt->closeCursor();
1280:
1281: return $count;
1282: }
1283:
1284:
1285: 1286: 1287: 1288: 1289: 1290: 1291: 1292: 1293:
1294: public static function doCountJoinAllExceptContact(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1295: {
1296:
1297: $criteria = clone $criteria;
1298:
1299:
1300:
1301:
1302: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1303:
1304: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1305: $criteria->setDistinct();
1306: }
1307:
1308: if (!$criteria->hasSelectClause()) {
1309: QuantificationPeer::addSelectColumns($criteria);
1310: }
1311:
1312: $criteria->clearOrderByColumns();
1313:
1314:
1315: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1316:
1317: if ($con === null) {
1318: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1319: }
1320:
1321: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1322:
1323: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1324:
1325: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1326:
1327: $stmt = BasePeer::doCount($criteria, $con);
1328:
1329: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1330: $count = (int) $row[0];
1331: } else {
1332: $count = 0;
1333: }
1334: $stmt->closeCursor();
1335:
1336: return $count;
1337: }
1338:
1339:
1340: 1341: 1342: 1343: 1344: 1345: 1346: 1347: 1348:
1349: public static function doCountJoinAllExceptProtocol(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1350: {
1351:
1352: $criteria = clone $criteria;
1353:
1354:
1355:
1356:
1357: $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1358:
1359: if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1360: $criteria->setDistinct();
1361: }
1362:
1363: if (!$criteria->hasSelectClause()) {
1364: QuantificationPeer::addSelectColumns($criteria);
1365: }
1366:
1367: $criteria->clearOrderByColumns();
1368:
1369:
1370: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1371:
1372: if ($con === null) {
1373: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1374: }
1375:
1376: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1377:
1378: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1379:
1380: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1381:
1382: $stmt = BasePeer::doCount($criteria, $con);
1383:
1384: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1385: $count = (int) $row[0];
1386: } else {
1387: $count = 0;
1388: }
1389: $stmt->closeCursor();
1390:
1391: return $count;
1392: }
1393:
1394:
1395: 1396: 1397: 1398: 1399: 1400: 1401: 1402: 1403: 1404:
1405: public static function doSelectJoinAllExceptAcquisition(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1406: {
1407: $criteria = clone $criteria;
1408:
1409:
1410:
1411:
1412: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1413: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1414: }
1415:
1416: QuantificationPeer::addSelectColumns($criteria);
1417: $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1418:
1419: AnalysisPeer::addSelectColumns($criteria);
1420: $startcol3 = $startcol2 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1421:
1422: ContactPeer::addSelectColumns($criteria);
1423: $startcol4 = $startcol3 + ContactPeer::NUM_HYDRATE_COLUMNS;
1424:
1425: ProtocolPeer::addSelectColumns($criteria);
1426: $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1427:
1428: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1429:
1430: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1431:
1432: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1433:
1434:
1435: $stmt = BasePeer::doSelect($criteria, $con);
1436: $results = array();
1437:
1438: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1439: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1440: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1441:
1442:
1443:
1444: } else {
1445: $cls = QuantificationPeer::getOMClass();
1446:
1447: $obj1 = new $cls();
1448: $obj1->hydrate($row);
1449: QuantificationPeer::addInstanceToPool($obj1, $key1);
1450: }
1451:
1452:
1453:
1454: $key2 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1455: if ($key2 !== null) {
1456: $obj2 = AnalysisPeer::getInstanceFromPool($key2);
1457: if (!$obj2) {
1458:
1459: $cls = AnalysisPeer::getOMClass();
1460:
1461: $obj2 = new $cls();
1462: $obj2->hydrate($row, $startcol2);
1463: AnalysisPeer::addInstanceToPool($obj2, $key2);
1464: }
1465:
1466:
1467: $obj2->addQuantification($obj1);
1468:
1469: }
1470:
1471:
1472:
1473: $key3 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1474: if ($key3 !== null) {
1475: $obj3 = ContactPeer::getInstanceFromPool($key3);
1476: if (!$obj3) {
1477:
1478: $cls = ContactPeer::getOMClass();
1479:
1480: $obj3 = new $cls();
1481: $obj3->hydrate($row, $startcol3);
1482: ContactPeer::addInstanceToPool($obj3, $key3);
1483: }
1484:
1485:
1486: $obj3->addQuantification($obj1);
1487:
1488: }
1489:
1490:
1491:
1492: $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1493: if ($key4 !== null) {
1494: $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1495: if (!$obj4) {
1496:
1497: $cls = ProtocolPeer::getOMClass();
1498:
1499: $obj4 = new $cls();
1500: $obj4->hydrate($row, $startcol4);
1501: ProtocolPeer::addInstanceToPool($obj4, $key4);
1502: }
1503:
1504:
1505: $obj4->addQuantification($obj1);
1506:
1507: }
1508:
1509: $results[] = $obj1;
1510: }
1511: $stmt->closeCursor();
1512:
1513: return $results;
1514: }
1515:
1516:
1517: 1518: 1519: 1520: 1521: 1522: 1523: 1524: 1525: 1526:
1527: public static function doSelectJoinAllExceptAnalysis(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1528: {
1529: $criteria = clone $criteria;
1530:
1531:
1532:
1533:
1534: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1535: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1536: }
1537:
1538: QuantificationPeer::addSelectColumns($criteria);
1539: $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1540:
1541: AcquisitionPeer::addSelectColumns($criteria);
1542: $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1543:
1544: ContactPeer::addSelectColumns($criteria);
1545: $startcol4 = $startcol3 + ContactPeer::NUM_HYDRATE_COLUMNS;
1546:
1547: ProtocolPeer::addSelectColumns($criteria);
1548: $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1549:
1550: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1551:
1552: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1553:
1554: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1555:
1556:
1557: $stmt = BasePeer::doSelect($criteria, $con);
1558: $results = array();
1559:
1560: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1561: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1562: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1563:
1564:
1565:
1566: } else {
1567: $cls = QuantificationPeer::getOMClass();
1568:
1569: $obj1 = new $cls();
1570: $obj1->hydrate($row);
1571: QuantificationPeer::addInstanceToPool($obj1, $key1);
1572: }
1573:
1574:
1575:
1576: $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1577: if ($key2 !== null) {
1578: $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1579: if (!$obj2) {
1580:
1581: $cls = AcquisitionPeer::getOMClass();
1582:
1583: $obj2 = new $cls();
1584: $obj2->hydrate($row, $startcol2);
1585: AcquisitionPeer::addInstanceToPool($obj2, $key2);
1586: }
1587:
1588:
1589: $obj2->addQuantification($obj1);
1590:
1591: }
1592:
1593:
1594:
1595: $key3 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1596: if ($key3 !== null) {
1597: $obj3 = ContactPeer::getInstanceFromPool($key3);
1598: if (!$obj3) {
1599:
1600: $cls = ContactPeer::getOMClass();
1601:
1602: $obj3 = new $cls();
1603: $obj3->hydrate($row, $startcol3);
1604: ContactPeer::addInstanceToPool($obj3, $key3);
1605: }
1606:
1607:
1608: $obj3->addQuantification($obj1);
1609:
1610: }
1611:
1612:
1613:
1614: $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1615: if ($key4 !== null) {
1616: $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1617: if (!$obj4) {
1618:
1619: $cls = ProtocolPeer::getOMClass();
1620:
1621: $obj4 = new $cls();
1622: $obj4->hydrate($row, $startcol4);
1623: ProtocolPeer::addInstanceToPool($obj4, $key4);
1624: }
1625:
1626:
1627: $obj4->addQuantification($obj1);
1628:
1629: }
1630:
1631: $results[] = $obj1;
1632: }
1633: $stmt->closeCursor();
1634:
1635: return $results;
1636: }
1637:
1638:
1639: 1640: 1641: 1642: 1643: 1644: 1645: 1646: 1647: 1648:
1649: public static function doSelectJoinAllExceptContact(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1650: {
1651: $criteria = clone $criteria;
1652:
1653:
1654:
1655:
1656: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1657: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1658: }
1659:
1660: QuantificationPeer::addSelectColumns($criteria);
1661: $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1662:
1663: AcquisitionPeer::addSelectColumns($criteria);
1664: $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1665:
1666: AnalysisPeer::addSelectColumns($criteria);
1667: $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1668:
1669: ProtocolPeer::addSelectColumns($criteria);
1670: $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1671:
1672: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1673:
1674: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1675:
1676: $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1677:
1678:
1679: $stmt = BasePeer::doSelect($criteria, $con);
1680: $results = array();
1681:
1682: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1683: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1684: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1685:
1686:
1687:
1688: } else {
1689: $cls = QuantificationPeer::getOMClass();
1690:
1691: $obj1 = new $cls();
1692: $obj1->hydrate($row);
1693: QuantificationPeer::addInstanceToPool($obj1, $key1);
1694: }
1695:
1696:
1697:
1698: $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1699: if ($key2 !== null) {
1700: $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1701: if (!$obj2) {
1702:
1703: $cls = AcquisitionPeer::getOMClass();
1704:
1705: $obj2 = new $cls();
1706: $obj2->hydrate($row, $startcol2);
1707: AcquisitionPeer::addInstanceToPool($obj2, $key2);
1708: }
1709:
1710:
1711: $obj2->addQuantification($obj1);
1712:
1713: }
1714:
1715:
1716:
1717: $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1718: if ($key3 !== null) {
1719: $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1720: if (!$obj3) {
1721:
1722: $cls = AnalysisPeer::getOMClass();
1723:
1724: $obj3 = new $cls();
1725: $obj3->hydrate($row, $startcol3);
1726: AnalysisPeer::addInstanceToPool($obj3, $key3);
1727: }
1728:
1729:
1730: $obj3->addQuantification($obj1);
1731:
1732: }
1733:
1734:
1735:
1736: $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1737: if ($key4 !== null) {
1738: $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1739: if (!$obj4) {
1740:
1741: $cls = ProtocolPeer::getOMClass();
1742:
1743: $obj4 = new $cls();
1744: $obj4->hydrate($row, $startcol4);
1745: ProtocolPeer::addInstanceToPool($obj4, $key4);
1746: }
1747:
1748:
1749: $obj4->addQuantification($obj1);
1750:
1751: }
1752:
1753: $results[] = $obj1;
1754: }
1755: $stmt->closeCursor();
1756:
1757: return $results;
1758: }
1759:
1760:
1761: 1762: 1763: 1764: 1765: 1766: 1767: 1768: 1769: 1770:
1771: public static function doSelectJoinAllExceptProtocol(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1772: {
1773: $criteria = clone $criteria;
1774:
1775:
1776:
1777:
1778: if ($criteria->getDbName() == Propel::getDefaultDB()) {
1779: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1780: }
1781:
1782: QuantificationPeer::addSelectColumns($criteria);
1783: $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1784:
1785: AcquisitionPeer::addSelectColumns($criteria);
1786: $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1787:
1788: AnalysisPeer::addSelectColumns($criteria);
1789: $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1790:
1791: ContactPeer::addSelectColumns($criteria);
1792: $startcol5 = $startcol4 + ContactPeer::NUM_HYDRATE_COLUMNS;
1793:
1794: $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1795:
1796: $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1797:
1798: $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1799:
1800:
1801: $stmt = BasePeer::doSelect($criteria, $con);
1802: $results = array();
1803:
1804: while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1805: $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1806: if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1807:
1808:
1809:
1810: } else {
1811: $cls = QuantificationPeer::getOMClass();
1812:
1813: $obj1 = new $cls();
1814: $obj1->hydrate($row);
1815: QuantificationPeer::addInstanceToPool($obj1, $key1);
1816: }
1817:
1818:
1819:
1820: $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1821: if ($key2 !== null) {
1822: $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1823: if (!$obj2) {
1824:
1825: $cls = AcquisitionPeer::getOMClass();
1826:
1827: $obj2 = new $cls();
1828: $obj2->hydrate($row, $startcol2);
1829: AcquisitionPeer::addInstanceToPool($obj2, $key2);
1830: }
1831:
1832:
1833: $obj2->addQuantification($obj1);
1834:
1835: }
1836:
1837:
1838:
1839: $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1840: if ($key3 !== null) {
1841: $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1842: if (!$obj3) {
1843:
1844: $cls = AnalysisPeer::getOMClass();
1845:
1846: $obj3 = new $cls();
1847: $obj3->hydrate($row, $startcol3);
1848: AnalysisPeer::addInstanceToPool($obj3, $key3);
1849: }
1850:
1851:
1852: $obj3->addQuantification($obj1);
1853:
1854: }
1855:
1856:
1857:
1858: $key4 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1859: if ($key4 !== null) {
1860: $obj4 = ContactPeer::getInstanceFromPool($key4);
1861: if (!$obj4) {
1862:
1863: $cls = ContactPeer::getOMClass();
1864:
1865: $obj4 = new $cls();
1866: $obj4->hydrate($row, $startcol4);
1867: ContactPeer::addInstanceToPool($obj4, $key4);
1868: }
1869:
1870:
1871: $obj4->addQuantification($obj1);
1872:
1873: }
1874:
1875: $results[] = $obj1;
1876: }
1877: $stmt->closeCursor();
1878:
1879: return $results;
1880: }
1881:
1882: 1883: 1884: 1885: 1886: 1887: 1888:
1889: public static function getTableMap()
1890: {
1891: return Propel::getDatabaseMap(QuantificationPeer::DATABASE_NAME)->getTable(QuantificationPeer::TABLE_NAME);
1892: }
1893:
1894: 1895: 1896:
1897: public static function buildTableMap()
1898: {
1899: $dbMap = Propel::getDatabaseMap(BaseQuantificationPeer::DATABASE_NAME);
1900: if (!$dbMap->hasTable(BaseQuantificationPeer::TABLE_NAME)) {
1901: $dbMap->addTableObject(new QuantificationTableMap());
1902: }
1903: }
1904:
1905: 1906: 1907: 1908: 1909: 1910:
1911: public static function getOMClass($row = 0, $colnum = 0)
1912: {
1913: return QuantificationPeer::OM_CLASS;
1914: }
1915:
1916: 1917: 1918: 1919: 1920: 1921: 1922: 1923: 1924:
1925: public static function doInsert($values, PropelPDO $con = null)
1926: {
1927: if ($con === null) {
1928: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1929: }
1930:
1931: if ($values instanceof Criteria) {
1932: $criteria = clone $values;
1933: } else {
1934: $criteria = $values->buildCriteria();
1935: }
1936:
1937: if ($criteria->containsKey(QuantificationPeer::QUANTIFICATION_ID) && $criteria->keyContainsValue(QuantificationPeer::QUANTIFICATION_ID) ) {
1938: throw new PropelException('Cannot insert a value for auto-increment primary key ('.QuantificationPeer::QUANTIFICATION_ID.')');
1939: }
1940:
1941:
1942:
1943: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1944:
1945: try {
1946:
1947:
1948: $con->beginTransaction();
1949: $pk = BasePeer::doInsert($criteria, $con);
1950: $con->commit();
1951: } catch (PropelException $e) {
1952: $con->rollBack();
1953: throw $e;
1954: }
1955:
1956: return $pk;
1957: }
1958:
1959: 1960: 1961: 1962: 1963: 1964: 1965: 1966: 1967:
1968: public static function doUpdate($values, PropelPDO $con = null)
1969: {
1970: if ($con === null) {
1971: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1972: }
1973:
1974: $selectCriteria = new Criteria(QuantificationPeer::DATABASE_NAME);
1975:
1976: if ($values instanceof Criteria) {
1977: $criteria = clone $values;
1978:
1979: $comparison = $criteria->getComparison(QuantificationPeer::QUANTIFICATION_ID);
1980: $value = $criteria->remove(QuantificationPeer::QUANTIFICATION_ID);
1981: if ($value) {
1982: $selectCriteria->add(QuantificationPeer::QUANTIFICATION_ID, $value, $comparison);
1983: } else {
1984: $selectCriteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1985: }
1986:
1987: } else {
1988: $criteria = $values->buildCriteria();
1989: $selectCriteria = $values->buildPkeyCriteria();
1990: }
1991:
1992:
1993: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1994:
1995: return BasePeer::doUpdate($selectCriteria, $criteria, $con);
1996: }
1997:
1998: 1999: 2000: 2001: 2002: 2003: 2004:
2005: public static function doDeleteAll(PropelPDO $con = null)
2006: {
2007: if ($con === null) {
2008: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
2009: }
2010: $affectedRows = 0;
2011: try {
2012:
2013:
2014: $con->beginTransaction();
2015: $affectedRows += BasePeer::doDeleteAll(QuantificationPeer::TABLE_NAME, $con, QuantificationPeer::DATABASE_NAME);
2016:
2017:
2018:
2019: QuantificationPeer::clearInstancePool();
2020: QuantificationPeer::clearRelatedInstancePool();
2021: $con->commit();
2022:
2023: return $affectedRows;
2024: } catch (PropelException $e) {
2025: $con->rollBack();
2026: throw $e;
2027: }
2028: }
2029:
2030: 2031: 2032: 2033: 2034: 2035: 2036: 2037: 2038: 2039: 2040:
2041: public static function doDelete($values, PropelPDO $con = null)
2042: {
2043: if ($con === null) {
2044: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
2045: }
2046:
2047: if ($values instanceof Criteria) {
2048:
2049:
2050:
2051: QuantificationPeer::clearInstancePool();
2052:
2053: $criteria = clone $values;
2054: } elseif ($values instanceof Quantification) {
2055:
2056: QuantificationPeer::removeInstanceFromPool($values);
2057:
2058: $criteria = $values->buildPkeyCriteria();
2059: } else {
2060: $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2061: $criteria->add(QuantificationPeer::QUANTIFICATION_ID, (array) $values, Criteria::IN);
2062:
2063: foreach ((array) $values as $singleval) {
2064: QuantificationPeer::removeInstanceFromPool($singleval);
2065: }
2066: }
2067:
2068:
2069: $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
2070:
2071: $affectedRows = 0;
2072:
2073: try {
2074:
2075:
2076: $con->beginTransaction();
2077:
2078: $affectedRows += BasePeer::doDelete($criteria, $con);
2079: QuantificationPeer::clearRelatedInstancePool();
2080: $con->commit();
2081:
2082: return $affectedRows;
2083: } catch (PropelException $e) {
2084: $con->rollBack();
2085: throw $e;
2086: }
2087: }
2088:
2089: 2090: 2091: 2092: 2093: 2094: 2095: 2096: 2097: 2098: 2099: 2100:
2101: public static function doValidate($obj, $cols = null)
2102: {
2103: $columns = array();
2104:
2105: if ($cols) {
2106: $dbMap = Propel::getDatabaseMap(QuantificationPeer::DATABASE_NAME);
2107: $tableMap = $dbMap->getTable(QuantificationPeer::TABLE_NAME);
2108:
2109: if (! is_array($cols)) {
2110: $cols = array($cols);
2111: }
2112:
2113: foreach ($cols as $colName) {
2114: if ($tableMap->hasColumn($colName)) {
2115: $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
2116: $columns[$colName] = $obj->$get();
2117: }
2118: }
2119: } else {
2120:
2121: }
2122:
2123: return BasePeer::doValidate(QuantificationPeer::DATABASE_NAME, QuantificationPeer::TABLE_NAME, $columns);
2124: }
2125:
2126: 2127: 2128: 2129: 2130: 2131: 2132:
2133: public static function retrieveByPK($pk, PropelPDO $con = null)
2134: {
2135:
2136: if (null !== ($obj = QuantificationPeer::getInstanceFromPool((string) $pk))) {
2137: return $obj;
2138: }
2139:
2140: if ($con === null) {
2141: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
2142: }
2143:
2144: $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2145: $criteria->add(QuantificationPeer::QUANTIFICATION_ID, $pk);
2146:
2147: $v = QuantificationPeer::doSelect($criteria, $con);
2148:
2149: return !empty($v) > 0 ? $v[0] : null;
2150: }
2151:
2152: 2153: 2154: 2155: 2156: 2157: 2158: 2159: 2160:
2161: public static function retrieveByPKs($pks, PropelPDO $con = null)
2162: {
2163: if ($con === null) {
2164: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
2165: }
2166:
2167: $objs = null;
2168: if (empty($pks)) {
2169: $objs = array();
2170: } else {
2171: $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2172: $criteria->add(QuantificationPeer::QUANTIFICATION_ID, $pks, Criteria::IN);
2173: $objs = QuantificationPeer::doSelect($criteria, $con);
2174: }
2175:
2176: return $objs;
2177: }
2178:
2179: }
2180:
2181:
2182:
2183: BaseQuantificationPeer::buildTableMap();
2184:
2185: