1: <?php
2:
3: namespace cli_db\propel\om;
4:
5: use \Criteria;
6: use \Exception;
7: use \ModelCriteria;
8: use \ModelJoin;
9: use \PDO;
10: use \Propel;
11: use \PropelCollection;
12: use \PropelException;
13: use \PropelObjectCollection;
14: use \PropelPDO;
15: use cli_db\propel\Cvterm;
16: use cli_db\propel\FeatureCvterm;
17: use cli_db\propel\FeatureCvtermPub;
18: use cli_db\propel\FeaturePub;
19: use cli_db\propel\FeatureSynonym;
20: use cli_db\propel\Pub;
21: use cli_db\propel\PubDbxref;
22: use cli_db\propel\PubPeer;
23: use cli_db\propel\PubQuery;
24: use cli_db\propel\PubRelationship;
25: use cli_db\propel\Pubauthor;
26: use cli_db\propel\Pubprop;
27:
28: /**
29: * Base class that represents a query for the 'pub' table.
30: *
31: *
32: *
33: * @method PubQuery orderByPubId($order = Criteria::ASC) Order by the pub_id column
34: * @method PubQuery orderByTitle($order = Criteria::ASC) Order by the title column
35: * @method PubQuery orderByVolumetitle($order = Criteria::ASC) Order by the volumetitle column
36: * @method PubQuery orderByVolume($order = Criteria::ASC) Order by the volume column
37: * @method PubQuery orderBySeriesName($order = Criteria::ASC) Order by the series_name column
38: * @method PubQuery orderByIssue($order = Criteria::ASC) Order by the issue column
39: * @method PubQuery orderByPyear($order = Criteria::ASC) Order by the pyear column
40: * @method PubQuery orderByPages($order = Criteria::ASC) Order by the pages column
41: * @method PubQuery orderByMiniref($order = Criteria::ASC) Order by the miniref column
42: * @method PubQuery orderByUniquename($order = Criteria::ASC) Order by the uniquename column
43: * @method PubQuery orderByTypeId($order = Criteria::ASC) Order by the type_id column
44: * @method PubQuery orderByIsObsolete($order = Criteria::ASC) Order by the is_obsolete column
45: * @method PubQuery orderByPublisher($order = Criteria::ASC) Order by the publisher column
46: * @method PubQuery orderByPubplace($order = Criteria::ASC) Order by the pubplace column
47: *
48: * @method PubQuery groupByPubId() Group by the pub_id column
49: * @method PubQuery groupByTitle() Group by the title column
50: * @method PubQuery groupByVolumetitle() Group by the volumetitle column
51: * @method PubQuery groupByVolume() Group by the volume column
52: * @method PubQuery groupBySeriesName() Group by the series_name column
53: * @method PubQuery groupByIssue() Group by the issue column
54: * @method PubQuery groupByPyear() Group by the pyear column
55: * @method PubQuery groupByPages() Group by the pages column
56: * @method PubQuery groupByMiniref() Group by the miniref column
57: * @method PubQuery groupByUniquename() Group by the uniquename column
58: * @method PubQuery groupByTypeId() Group by the type_id column
59: * @method PubQuery groupByIsObsolete() Group by the is_obsolete column
60: * @method PubQuery groupByPublisher() Group by the publisher column
61: * @method PubQuery groupByPubplace() Group by the pubplace column
62: *
63: * @method PubQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
64: * @method PubQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
65: * @method PubQuery innerJoin($relation) Adds a INNER JOIN clause to the query
66: *
67: * @method PubQuery leftJoinCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the Cvterm relation
68: * @method PubQuery rightJoinCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Cvterm relation
69: * @method PubQuery innerJoinCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the Cvterm relation
70: *
71: * @method PubQuery leftJoinFeatureCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureCvterm relation
72: * @method PubQuery rightJoinFeatureCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureCvterm relation
73: * @method PubQuery innerJoinFeatureCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureCvterm relation
74: *
75: * @method PubQuery leftJoinFeatureCvtermPub($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureCvtermPub relation
76: * @method PubQuery rightJoinFeatureCvtermPub($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureCvtermPub relation
77: * @method PubQuery innerJoinFeatureCvtermPub($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureCvtermPub relation
78: *
79: * @method PubQuery leftJoinFeaturePub($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeaturePub relation
80: * @method PubQuery rightJoinFeaturePub($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeaturePub relation
81: * @method PubQuery innerJoinFeaturePub($relationAlias = null) Adds a INNER JOIN clause to the query using the FeaturePub relation
82: *
83: * @method PubQuery leftJoinFeatureSynonym($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureSynonym relation
84: * @method PubQuery rightJoinFeatureSynonym($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureSynonym relation
85: * @method PubQuery innerJoinFeatureSynonym($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureSynonym relation
86: *
87: * @method PubQuery leftJoinPubDbxref($relationAlias = null) Adds a LEFT JOIN clause to the query using the PubDbxref relation
88: * @method PubQuery rightJoinPubDbxref($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PubDbxref relation
89: * @method PubQuery innerJoinPubDbxref($relationAlias = null) Adds a INNER JOIN clause to the query using the PubDbxref relation
90: *
91: * @method PubQuery leftJoinPubRelationshipRelatedByObjectId($relationAlias = null) Adds a LEFT JOIN clause to the query using the PubRelationshipRelatedByObjectId relation
92: * @method PubQuery rightJoinPubRelationshipRelatedByObjectId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PubRelationshipRelatedByObjectId relation
93: * @method PubQuery innerJoinPubRelationshipRelatedByObjectId($relationAlias = null) Adds a INNER JOIN clause to the query using the PubRelationshipRelatedByObjectId relation
94: *
95: * @method PubQuery leftJoinPubRelationshipRelatedBySubjectId($relationAlias = null) Adds a LEFT JOIN clause to the query using the PubRelationshipRelatedBySubjectId relation
96: * @method PubQuery rightJoinPubRelationshipRelatedBySubjectId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PubRelationshipRelatedBySubjectId relation
97: * @method PubQuery innerJoinPubRelationshipRelatedBySubjectId($relationAlias = null) Adds a INNER JOIN clause to the query using the PubRelationshipRelatedBySubjectId relation
98: *
99: * @method PubQuery leftJoinPubauthor($relationAlias = null) Adds a LEFT JOIN clause to the query using the Pubauthor relation
100: * @method PubQuery rightJoinPubauthor($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Pubauthor relation
101: * @method PubQuery innerJoinPubauthor($relationAlias = null) Adds a INNER JOIN clause to the query using the Pubauthor relation
102: *
103: * @method PubQuery leftJoinPubprop($relationAlias = null) Adds a LEFT JOIN clause to the query using the Pubprop relation
104: * @method PubQuery rightJoinPubprop($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Pubprop relation
105: * @method PubQuery innerJoinPubprop($relationAlias = null) Adds a INNER JOIN clause to the query using the Pubprop relation
106: *
107: * @method Pub findOne(PropelPDO $con = null) Return the first Pub matching the query
108: * @method Pub findOneOrCreate(PropelPDO $con = null) Return the first Pub matching the query, or a new Pub object populated from the query conditions when no match is found
109: *
110: * @method Pub findOneByTitle(string $title) Return the first Pub filtered by the title column
111: * @method Pub findOneByVolumetitle(string $volumetitle) Return the first Pub filtered by the volumetitle column
112: * @method Pub findOneByVolume(string $volume) Return the first Pub filtered by the volume column
113: * @method Pub findOneBySeriesName(string $series_name) Return the first Pub filtered by the series_name column
114: * @method Pub findOneByIssue(string $issue) Return the first Pub filtered by the issue column
115: * @method Pub findOneByPyear(string $pyear) Return the first Pub filtered by the pyear column
116: * @method Pub findOneByPages(string $pages) Return the first Pub filtered by the pages column
117: * @method Pub findOneByMiniref(string $miniref) Return the first Pub filtered by the miniref column
118: * @method Pub findOneByUniquename(string $uniquename) Return the first Pub filtered by the uniquename column
119: * @method Pub findOneByTypeId(int $type_id) Return the first Pub filtered by the type_id column
120: * @method Pub findOneByIsObsolete(boolean $is_obsolete) Return the first Pub filtered by the is_obsolete column
121: * @method Pub findOneByPublisher(string $publisher) Return the first Pub filtered by the publisher column
122: * @method Pub findOneByPubplace(string $pubplace) Return the first Pub filtered by the pubplace column
123: *
124: * @method array findByPubId(int $pub_id) Return Pub objects filtered by the pub_id column
125: * @method array findByTitle(string $title) Return Pub objects filtered by the title column
126: * @method array findByVolumetitle(string $volumetitle) Return Pub objects filtered by the volumetitle column
127: * @method array findByVolume(string $volume) Return Pub objects filtered by the volume column
128: * @method array findBySeriesName(string $series_name) Return Pub objects filtered by the series_name column
129: * @method array findByIssue(string $issue) Return Pub objects filtered by the issue column
130: * @method array findByPyear(string $pyear) Return Pub objects filtered by the pyear column
131: * @method array findByPages(string $pages) Return Pub objects filtered by the pages column
132: * @method array findByMiniref(string $miniref) Return Pub objects filtered by the miniref column
133: * @method array findByUniquename(string $uniquename) Return Pub objects filtered by the uniquename column
134: * @method array findByTypeId(int $type_id) Return Pub objects filtered by the type_id column
135: * @method array findByIsObsolete(boolean $is_obsolete) Return Pub objects filtered by the is_obsolete column
136: * @method array findByPublisher(string $publisher) Return Pub objects filtered by the publisher column
137: * @method array findByPubplace(string $pubplace) Return Pub objects filtered by the pubplace column
138: *
139: * @package propel.generator.cli_db.om
140: */
141: abstract class BasePubQuery extends ModelCriteria
142: {
143: /**
144: * Initializes internal state of BasePubQuery object.
145: *
146: * @param string $dbName The dabase name
147: * @param string $modelName The phpName of a model, e.g. 'Book'
148: * @param string $modelAlias The alias for the model in this query, e.g. 'b'
149: */
150: public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\Pub', $modelAlias = null)
151: {
152: parent::__construct($dbName, $modelName, $modelAlias);
153: }
154:
155: /**
156: * Returns a new PubQuery object.
157: *
158: * @param string $modelAlias The alias of a model in the query
159: * @param PubQuery|Criteria $criteria Optional Criteria to build the query from
160: *
161: * @return PubQuery
162: */
163: public static function create($modelAlias = null, $criteria = null)
164: {
165: if ($criteria instanceof PubQuery) {
166: return $criteria;
167: }
168: $query = new PubQuery();
169: if (null !== $modelAlias) {
170: $query->setModelAlias($modelAlias);
171: }
172: if ($criteria instanceof Criteria) {
173: $query->mergeWith($criteria);
174: }
175:
176: return $query;
177: }
178:
179: /**
180: * Find object by primary key.
181: * Propel uses the instance pool to skip the database if the object exists.
182: * Go fast if the query is untouched.
183: *
184: * <code>
185: * $obj = $c->findPk(12, $con);
186: * </code>
187: *
188: * @param mixed $key Primary key to use for the query
189: * @param PropelPDO $con an optional connection object
190: *
191: * @return Pub|Pub[]|mixed the result, formatted by the current formatter
192: */
193: public function findPk($key, $con = null)
194: {
195: if ($key === null) {
196: return null;
197: }
198: if ((null !== ($obj = PubPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
199: // the object is alredy in the instance pool
200: return $obj;
201: }
202: if ($con === null) {
203: $con = Propel::getConnection(PubPeer::DATABASE_NAME, Propel::CONNECTION_READ);
204: }
205: $this->basePreSelect($con);
206: if ($this->formatter || $this->modelAlias || $this->with || $this->select
207: || $this->selectColumns || $this->asColumns || $this->selectModifiers
208: || $this->map || $this->having || $this->joins) {
209: return $this->findPkComplex($key, $con);
210: } else {
211: return $this->findPkSimple($key, $con);
212: }
213: }
214:
215: /**
216: * Alias of findPk to use instance pooling
217: *
218: * @param mixed $key Primary key to use for the query
219: * @param PropelPDO $con A connection object
220: *
221: * @return Pub A model object, or null if the key is not found
222: * @throws PropelException
223: */
224: public function findOneByPubId($key, $con = null)
225: {
226: return $this->findPk($key, $con);
227: }
228:
229: /**
230: * Find object by primary key using raw SQL to go fast.
231: * Bypass doSelect() and the object formatter by using generated code.
232: *
233: * @param mixed $key Primary key to use for the query
234: * @param PropelPDO $con A connection object
235: *
236: * @return Pub A model object, or null if the key is not found
237: * @throws PropelException
238: */
239: protected function findPkSimple($key, $con)
240: {
241: $sql = 'SELECT "pub_id", "title", "volumetitle", "volume", "series_name", "issue", "pyear", "pages", "miniref", "uniquename", "type_id", "is_obsolete", "publisher", "pubplace" FROM "pub" WHERE "pub_id" = :p0';
242: try {
243: $stmt = $con->prepare($sql);
244: $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
245: $stmt->execute();
246: } catch (Exception $e) {
247: Propel::log($e->getMessage(), Propel::LOG_ERR);
248: throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
249: }
250: $obj = null;
251: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
252: $obj = new Pub();
253: $obj->hydrate($row);
254: PubPeer::addInstanceToPool($obj, (string) $key);
255: }
256: $stmt->closeCursor();
257:
258: return $obj;
259: }
260:
261: /**
262: * Find object by primary key.
263: *
264: * @param mixed $key Primary key to use for the query
265: * @param PropelPDO $con A connection object
266: *
267: * @return Pub|Pub[]|mixed the result, formatted by the current formatter
268: */
269: protected function findPkComplex($key, $con)
270: {
271: // As the query uses a PK condition, no limit(1) is necessary.
272: $criteria = $this->isKeepQuery() ? clone $this : $this;
273: $stmt = $criteria
274: ->filterByPrimaryKey($key)
275: ->doSelect($con);
276:
277: return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
278: }
279:
280: /**
281: * Find objects by primary key
282: * <code>
283: * $objs = $c->findPks(array(12, 56, 832), $con);
284: * </code>
285: * @param array $keys Primary keys to use for the query
286: * @param PropelPDO $con an optional connection object
287: *
288: * @return PropelObjectCollection|Pub[]|mixed the list of results, formatted by the current formatter
289: */
290: public function findPks($keys, $con = null)
291: {
292: if ($con === null) {
293: $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
294: }
295: $this->basePreSelect($con);
296: $criteria = $this->isKeepQuery() ? clone $this : $this;
297: $stmt = $criteria
298: ->filterByPrimaryKeys($keys)
299: ->doSelect($con);
300:
301: return $criteria->getFormatter()->init($criteria)->format($stmt);
302: }
303:
304: /**
305: * Filter the query by primary key
306: *
307: * @param mixed $key Primary key to use for the query
308: *
309: * @return PubQuery The current query, for fluid interface
310: */
311: public function filterByPrimaryKey($key)
312: {
313:
314: return $this->addUsingAlias(PubPeer::PUB_ID, $key, Criteria::EQUAL);
315: }
316:
317: /**
318: * Filter the query by a list of primary keys
319: *
320: * @param array $keys The list of primary key to use for the query
321: *
322: * @return PubQuery The current query, for fluid interface
323: */
324: public function filterByPrimaryKeys($keys)
325: {
326:
327: return $this->addUsingAlias(PubPeer::PUB_ID, $keys, Criteria::IN);
328: }
329:
330: /**
331: * Filter the query on the pub_id column
332: *
333: * Example usage:
334: * <code>
335: * $query->filterByPubId(1234); // WHERE pub_id = 1234
336: * $query->filterByPubId(array(12, 34)); // WHERE pub_id IN (12, 34)
337: * $query->filterByPubId(array('min' => 12)); // WHERE pub_id >= 12
338: * $query->filterByPubId(array('max' => 12)); // WHERE pub_id <= 12
339: * </code>
340: *
341: * @param mixed $pubId The value to use as filter.
342: * Use scalar values for equality.
343: * Use array values for in_array() equivalent.
344: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
345: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
346: *
347: * @return PubQuery The current query, for fluid interface
348: */
349: public function filterByPubId($pubId = null, $comparison = null)
350: {
351: if (is_array($pubId)) {
352: $useMinMax = false;
353: if (isset($pubId['min'])) {
354: $this->addUsingAlias(PubPeer::PUB_ID, $pubId['min'], Criteria::GREATER_EQUAL);
355: $useMinMax = true;
356: }
357: if (isset($pubId['max'])) {
358: $this->addUsingAlias(PubPeer::PUB_ID, $pubId['max'], Criteria::LESS_EQUAL);
359: $useMinMax = true;
360: }
361: if ($useMinMax) {
362: return $this;
363: }
364: if (null === $comparison) {
365: $comparison = Criteria::IN;
366: }
367: }
368:
369: return $this->addUsingAlias(PubPeer::PUB_ID, $pubId, $comparison);
370: }
371:
372: /**
373: * Filter the query on the title column
374: *
375: * Example usage:
376: * <code>
377: * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
378: * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
379: * </code>
380: *
381: * @param string $title The value to use as filter.
382: * Accepts wildcards (* and % trigger a LIKE)
383: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
384: *
385: * @return PubQuery The current query, for fluid interface
386: */
387: public function filterByTitle($title = null, $comparison = null)
388: {
389: if (null === $comparison) {
390: if (is_array($title)) {
391: $comparison = Criteria::IN;
392: } elseif (preg_match('/[\%\*]/', $title)) {
393: $title = str_replace('*', '%', $title);
394: $comparison = Criteria::LIKE;
395: }
396: }
397:
398: return $this->addUsingAlias(PubPeer::TITLE, $title, $comparison);
399: }
400:
401: /**
402: * Filter the query on the volumetitle column
403: *
404: * Example usage:
405: * <code>
406: * $query->filterByVolumetitle('fooValue'); // WHERE volumetitle = 'fooValue'
407: * $query->filterByVolumetitle('%fooValue%'); // WHERE volumetitle LIKE '%fooValue%'
408: * </code>
409: *
410: * @param string $volumetitle The value to use as filter.
411: * Accepts wildcards (* and % trigger a LIKE)
412: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
413: *
414: * @return PubQuery The current query, for fluid interface
415: */
416: public function filterByVolumetitle($volumetitle = null, $comparison = null)
417: {
418: if (null === $comparison) {
419: if (is_array($volumetitle)) {
420: $comparison = Criteria::IN;
421: } elseif (preg_match('/[\%\*]/', $volumetitle)) {
422: $volumetitle = str_replace('*', '%', $volumetitle);
423: $comparison = Criteria::LIKE;
424: }
425: }
426:
427: return $this->addUsingAlias(PubPeer::VOLUMETITLE, $volumetitle, $comparison);
428: }
429:
430: /**
431: * Filter the query on the volume column
432: *
433: * Example usage:
434: * <code>
435: * $query->filterByVolume('fooValue'); // WHERE volume = 'fooValue'
436: * $query->filterByVolume('%fooValue%'); // WHERE volume LIKE '%fooValue%'
437: * </code>
438: *
439: * @param string $volume The value to use as filter.
440: * Accepts wildcards (* and % trigger a LIKE)
441: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
442: *
443: * @return PubQuery The current query, for fluid interface
444: */
445: public function filterByVolume($volume = null, $comparison = null)
446: {
447: if (null === $comparison) {
448: if (is_array($volume)) {
449: $comparison = Criteria::IN;
450: } elseif (preg_match('/[\%\*]/', $volume)) {
451: $volume = str_replace('*', '%', $volume);
452: $comparison = Criteria::LIKE;
453: }
454: }
455:
456: return $this->addUsingAlias(PubPeer::VOLUME, $volume, $comparison);
457: }
458:
459: /**
460: * Filter the query on the series_name column
461: *
462: * Example usage:
463: * <code>
464: * $query->filterBySeriesName('fooValue'); // WHERE series_name = 'fooValue'
465: * $query->filterBySeriesName('%fooValue%'); // WHERE series_name LIKE '%fooValue%'
466: * </code>
467: *
468: * @param string $seriesName The value to use as filter.
469: * Accepts wildcards (* and % trigger a LIKE)
470: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
471: *
472: * @return PubQuery The current query, for fluid interface
473: */
474: public function filterBySeriesName($seriesName = null, $comparison = null)
475: {
476: if (null === $comparison) {
477: if (is_array($seriesName)) {
478: $comparison = Criteria::IN;
479: } elseif (preg_match('/[\%\*]/', $seriesName)) {
480: $seriesName = str_replace('*', '%', $seriesName);
481: $comparison = Criteria::LIKE;
482: }
483: }
484:
485: return $this->addUsingAlias(PubPeer::SERIES_NAME, $seriesName, $comparison);
486: }
487:
488: /**
489: * Filter the query on the issue column
490: *
491: * Example usage:
492: * <code>
493: * $query->filterByIssue('fooValue'); // WHERE issue = 'fooValue'
494: * $query->filterByIssue('%fooValue%'); // WHERE issue LIKE '%fooValue%'
495: * </code>
496: *
497: * @param string $issue The value to use as filter.
498: * Accepts wildcards (* and % trigger a LIKE)
499: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
500: *
501: * @return PubQuery The current query, for fluid interface
502: */
503: public function filterByIssue($issue = null, $comparison = null)
504: {
505: if (null === $comparison) {
506: if (is_array($issue)) {
507: $comparison = Criteria::IN;
508: } elseif (preg_match('/[\%\*]/', $issue)) {
509: $issue = str_replace('*', '%', $issue);
510: $comparison = Criteria::LIKE;
511: }
512: }
513:
514: return $this->addUsingAlias(PubPeer::ISSUE, $issue, $comparison);
515: }
516:
517: /**
518: * Filter the query on the pyear column
519: *
520: * Example usage:
521: * <code>
522: * $query->filterByPyear('fooValue'); // WHERE pyear = 'fooValue'
523: * $query->filterByPyear('%fooValue%'); // WHERE pyear LIKE '%fooValue%'
524: * </code>
525: *
526: * @param string $pyear The value to use as filter.
527: * Accepts wildcards (* and % trigger a LIKE)
528: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
529: *
530: * @return PubQuery The current query, for fluid interface
531: */
532: public function filterByPyear($pyear = null, $comparison = null)
533: {
534: if (null === $comparison) {
535: if (is_array($pyear)) {
536: $comparison = Criteria::IN;
537: } elseif (preg_match('/[\%\*]/', $pyear)) {
538: $pyear = str_replace('*', '%', $pyear);
539: $comparison = Criteria::LIKE;
540: }
541: }
542:
543: return $this->addUsingAlias(PubPeer::PYEAR, $pyear, $comparison);
544: }
545:
546: /**
547: * Filter the query on the pages column
548: *
549: * Example usage:
550: * <code>
551: * $query->filterByPages('fooValue'); // WHERE pages = 'fooValue'
552: * $query->filterByPages('%fooValue%'); // WHERE pages LIKE '%fooValue%'
553: * </code>
554: *
555: * @param string $pages The value to use as filter.
556: * Accepts wildcards (* and % trigger a LIKE)
557: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
558: *
559: * @return PubQuery The current query, for fluid interface
560: */
561: public function filterByPages($pages = null, $comparison = null)
562: {
563: if (null === $comparison) {
564: if (is_array($pages)) {
565: $comparison = Criteria::IN;
566: } elseif (preg_match('/[\%\*]/', $pages)) {
567: $pages = str_replace('*', '%', $pages);
568: $comparison = Criteria::LIKE;
569: }
570: }
571:
572: return $this->addUsingAlias(PubPeer::PAGES, $pages, $comparison);
573: }
574:
575: /**
576: * Filter the query on the miniref column
577: *
578: * Example usage:
579: * <code>
580: * $query->filterByMiniref('fooValue'); // WHERE miniref = 'fooValue'
581: * $query->filterByMiniref('%fooValue%'); // WHERE miniref LIKE '%fooValue%'
582: * </code>
583: *
584: * @param string $miniref The value to use as filter.
585: * Accepts wildcards (* and % trigger a LIKE)
586: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
587: *
588: * @return PubQuery The current query, for fluid interface
589: */
590: public function filterByMiniref($miniref = null, $comparison = null)
591: {
592: if (null === $comparison) {
593: if (is_array($miniref)) {
594: $comparison = Criteria::IN;
595: } elseif (preg_match('/[\%\*]/', $miniref)) {
596: $miniref = str_replace('*', '%', $miniref);
597: $comparison = Criteria::LIKE;
598: }
599: }
600:
601: return $this->addUsingAlias(PubPeer::MINIREF, $miniref, $comparison);
602: }
603:
604: /**
605: * Filter the query on the uniquename column
606: *
607: * Example usage:
608: * <code>
609: * $query->filterByUniquename('fooValue'); // WHERE uniquename = 'fooValue'
610: * $query->filterByUniquename('%fooValue%'); // WHERE uniquename LIKE '%fooValue%'
611: * </code>
612: *
613: * @param string $uniquename The value to use as filter.
614: * Accepts wildcards (* and % trigger a LIKE)
615: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
616: *
617: * @return PubQuery The current query, for fluid interface
618: */
619: public function filterByUniquename($uniquename = null, $comparison = null)
620: {
621: if (null === $comparison) {
622: if (is_array($uniquename)) {
623: $comparison = Criteria::IN;
624: } elseif (preg_match('/[\%\*]/', $uniquename)) {
625: $uniquename = str_replace('*', '%', $uniquename);
626: $comparison = Criteria::LIKE;
627: }
628: }
629:
630: return $this->addUsingAlias(PubPeer::UNIQUENAME, $uniquename, $comparison);
631: }
632:
633: /**
634: * Filter the query on the type_id column
635: *
636: * Example usage:
637: * <code>
638: * $query->filterByTypeId(1234); // WHERE type_id = 1234
639: * $query->filterByTypeId(array(12, 34)); // WHERE type_id IN (12, 34)
640: * $query->filterByTypeId(array('min' => 12)); // WHERE type_id >= 12
641: * $query->filterByTypeId(array('max' => 12)); // WHERE type_id <= 12
642: * </code>
643: *
644: * @see filterByCvterm()
645: *
646: * @param mixed $typeId The value to use as filter.
647: * Use scalar values for equality.
648: * Use array values for in_array() equivalent.
649: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
650: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
651: *
652: * @return PubQuery The current query, for fluid interface
653: */
654: public function filterByTypeId($typeId = null, $comparison = null)
655: {
656: if (is_array($typeId)) {
657: $useMinMax = false;
658: if (isset($typeId['min'])) {
659: $this->addUsingAlias(PubPeer::TYPE_ID, $typeId['min'], Criteria::GREATER_EQUAL);
660: $useMinMax = true;
661: }
662: if (isset($typeId['max'])) {
663: $this->addUsingAlias(PubPeer::TYPE_ID, $typeId['max'], Criteria::LESS_EQUAL);
664: $useMinMax = true;
665: }
666: if ($useMinMax) {
667: return $this;
668: }
669: if (null === $comparison) {
670: $comparison = Criteria::IN;
671: }
672: }
673:
674: return $this->addUsingAlias(PubPeer::TYPE_ID, $typeId, $comparison);
675: }
676:
677: /**
678: * Filter the query on the is_obsolete column
679: *
680: * Example usage:
681: * <code>
682: * $query->filterByIsObsolete(true); // WHERE is_obsolete = true
683: * $query->filterByIsObsolete('yes'); // WHERE is_obsolete = true
684: * </code>
685: *
686: * @param boolean|string $isObsolete The value to use as filter.
687: * Non-boolean arguments are converted using the following rules:
688: * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
689: * * 0, '0', 'false', 'off', and 'no' are converted to boolean false
690: * Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
691: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
692: *
693: * @return PubQuery The current query, for fluid interface
694: */
695: public function filterByIsObsolete($isObsolete = null, $comparison = null)
696: {
697: if (is_string($isObsolete)) {
698: $isObsolete = in_array(strtolower($isObsolete), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
699: }
700:
701: return $this->addUsingAlias(PubPeer::IS_OBSOLETE, $isObsolete, $comparison);
702: }
703:
704: /**
705: * Filter the query on the publisher column
706: *
707: * Example usage:
708: * <code>
709: * $query->filterByPublisher('fooValue'); // WHERE publisher = 'fooValue'
710: * $query->filterByPublisher('%fooValue%'); // WHERE publisher LIKE '%fooValue%'
711: * </code>
712: *
713: * @param string $publisher The value to use as filter.
714: * Accepts wildcards (* and % trigger a LIKE)
715: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
716: *
717: * @return PubQuery The current query, for fluid interface
718: */
719: public function filterByPublisher($publisher = null, $comparison = null)
720: {
721: if (null === $comparison) {
722: if (is_array($publisher)) {
723: $comparison = Criteria::IN;
724: } elseif (preg_match('/[\%\*]/', $publisher)) {
725: $publisher = str_replace('*', '%', $publisher);
726: $comparison = Criteria::LIKE;
727: }
728: }
729:
730: return $this->addUsingAlias(PubPeer::PUBLISHER, $publisher, $comparison);
731: }
732:
733: /**
734: * Filter the query on the pubplace column
735: *
736: * Example usage:
737: * <code>
738: * $query->filterByPubplace('fooValue'); // WHERE pubplace = 'fooValue'
739: * $query->filterByPubplace('%fooValue%'); // WHERE pubplace LIKE '%fooValue%'
740: * </code>
741: *
742: * @param string $pubplace The value to use as filter.
743: * Accepts wildcards (* and % trigger a LIKE)
744: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
745: *
746: * @return PubQuery The current query, for fluid interface
747: */
748: public function filterByPubplace($pubplace = null, $comparison = null)
749: {
750: if (null === $comparison) {
751: if (is_array($pubplace)) {
752: $comparison = Criteria::IN;
753: } elseif (preg_match('/[\%\*]/', $pubplace)) {
754: $pubplace = str_replace('*', '%', $pubplace);
755: $comparison = Criteria::LIKE;
756: }
757: }
758:
759: return $this->addUsingAlias(PubPeer::PUBPLACE, $pubplace, $comparison);
760: }
761:
762: /**
763: * Filter the query by a related Cvterm object
764: *
765: * @param Cvterm|PropelObjectCollection $cvterm The related object(s) to use as filter
766: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
767: *
768: * @return PubQuery The current query, for fluid interface
769: * @throws PropelException - if the provided filter is invalid.
770: */
771: public function filterByCvterm($cvterm, $comparison = null)
772: {
773: if ($cvterm instanceof Cvterm) {
774: return $this
775: ->addUsingAlias(PubPeer::TYPE_ID, $cvterm->getCvtermId(), $comparison);
776: } elseif ($cvterm instanceof PropelObjectCollection) {
777: if (null === $comparison) {
778: $comparison = Criteria::IN;
779: }
780:
781: return $this
782: ->addUsingAlias(PubPeer::TYPE_ID, $cvterm->toKeyValue('PrimaryKey', 'CvtermId'), $comparison);
783: } else {
784: throw new PropelException('filterByCvterm() only accepts arguments of type Cvterm or PropelCollection');
785: }
786: }
787:
788: /**
789: * Adds a JOIN clause to the query using the Cvterm relation
790: *
791: * @param string $relationAlias optional alias for the relation
792: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
793: *
794: * @return PubQuery The current query, for fluid interface
795: */
796: public function joinCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
797: {
798: $tableMap = $this->getTableMap();
799: $relationMap = $tableMap->getRelation('Cvterm');
800:
801: // create a ModelJoin object for this join
802: $join = new ModelJoin();
803: $join->setJoinType($joinType);
804: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
805: if ($previousJoin = $this->getPreviousJoin()) {
806: $join->setPreviousJoin($previousJoin);
807: }
808:
809: // add the ModelJoin to the current object
810: if ($relationAlias) {
811: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
812: $this->addJoinObject($join, $relationAlias);
813: } else {
814: $this->addJoinObject($join, 'Cvterm');
815: }
816:
817: return $this;
818: }
819:
820: /**
821: * Use the Cvterm relation Cvterm object
822: *
823: * @see useQuery()
824: *
825: * @param string $relationAlias optional alias for the relation,
826: * to be used as main alias in the secondary query
827: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
828: *
829: * @return \cli_db\propel\CvtermQuery A secondary query class using the current class as primary query
830: */
831: public function useCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
832: {
833: return $this
834: ->joinCvterm($relationAlias, $joinType)
835: ->useQuery($relationAlias ? $relationAlias : 'Cvterm', '\cli_db\propel\CvtermQuery');
836: }
837:
838: /**
839: * Filter the query by a related FeatureCvterm object
840: *
841: * @param FeatureCvterm|PropelObjectCollection $featureCvterm the related object to use as filter
842: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
843: *
844: * @return PubQuery The current query, for fluid interface
845: * @throws PropelException - if the provided filter is invalid.
846: */
847: public function filterByFeatureCvterm($featureCvterm, $comparison = null)
848: {
849: if ($featureCvterm instanceof FeatureCvterm) {
850: return $this
851: ->addUsingAlias(PubPeer::PUB_ID, $featureCvterm->getPubId(), $comparison);
852: } elseif ($featureCvterm instanceof PropelObjectCollection) {
853: return $this
854: ->useFeatureCvtermQuery()
855: ->filterByPrimaryKeys($featureCvterm->getPrimaryKeys())
856: ->endUse();
857: } else {
858: throw new PropelException('filterByFeatureCvterm() only accepts arguments of type FeatureCvterm or PropelCollection');
859: }
860: }
861:
862: /**
863: * Adds a JOIN clause to the query using the FeatureCvterm relation
864: *
865: * @param string $relationAlias optional alias for the relation
866: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
867: *
868: * @return PubQuery The current query, for fluid interface
869: */
870: public function joinFeatureCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
871: {
872: $tableMap = $this->getTableMap();
873: $relationMap = $tableMap->getRelation('FeatureCvterm');
874:
875: // create a ModelJoin object for this join
876: $join = new ModelJoin();
877: $join->setJoinType($joinType);
878: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
879: if ($previousJoin = $this->getPreviousJoin()) {
880: $join->setPreviousJoin($previousJoin);
881: }
882:
883: // add the ModelJoin to the current object
884: if ($relationAlias) {
885: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
886: $this->addJoinObject($join, $relationAlias);
887: } else {
888: $this->addJoinObject($join, 'FeatureCvterm');
889: }
890:
891: return $this;
892: }
893:
894: /**
895: * Use the FeatureCvterm relation FeatureCvterm object
896: *
897: * @see useQuery()
898: *
899: * @param string $relationAlias optional alias for the relation,
900: * to be used as main alias in the secondary query
901: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
902: *
903: * @return \cli_db\propel\FeatureCvtermQuery A secondary query class using the current class as primary query
904: */
905: public function useFeatureCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
906: {
907: return $this
908: ->joinFeatureCvterm($relationAlias, $joinType)
909: ->useQuery($relationAlias ? $relationAlias : 'FeatureCvterm', '\cli_db\propel\FeatureCvtermQuery');
910: }
911:
912: /**
913: * Filter the query by a related FeatureCvtermPub object
914: *
915: * @param FeatureCvtermPub|PropelObjectCollection $featureCvtermPub the related object to use as filter
916: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
917: *
918: * @return PubQuery The current query, for fluid interface
919: * @throws PropelException - if the provided filter is invalid.
920: */
921: public function filterByFeatureCvtermPub($featureCvtermPub, $comparison = null)
922: {
923: if ($featureCvtermPub instanceof FeatureCvtermPub) {
924: return $this
925: ->addUsingAlias(PubPeer::PUB_ID, $featureCvtermPub->getPubId(), $comparison);
926: } elseif ($featureCvtermPub instanceof PropelObjectCollection) {
927: return $this
928: ->useFeatureCvtermPubQuery()
929: ->filterByPrimaryKeys($featureCvtermPub->getPrimaryKeys())
930: ->endUse();
931: } else {
932: throw new PropelException('filterByFeatureCvtermPub() only accepts arguments of type FeatureCvtermPub or PropelCollection');
933: }
934: }
935:
936: /**
937: * Adds a JOIN clause to the query using the FeatureCvtermPub relation
938: *
939: * @param string $relationAlias optional alias for the relation
940: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
941: *
942: * @return PubQuery The current query, for fluid interface
943: */
944: public function joinFeatureCvtermPub($relationAlias = null, $joinType = Criteria::INNER_JOIN)
945: {
946: $tableMap = $this->getTableMap();
947: $relationMap = $tableMap->getRelation('FeatureCvtermPub');
948:
949: // create a ModelJoin object for this join
950: $join = new ModelJoin();
951: $join->setJoinType($joinType);
952: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
953: if ($previousJoin = $this->getPreviousJoin()) {
954: $join->setPreviousJoin($previousJoin);
955: }
956:
957: // add the ModelJoin to the current object
958: if ($relationAlias) {
959: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
960: $this->addJoinObject($join, $relationAlias);
961: } else {
962: $this->addJoinObject($join, 'FeatureCvtermPub');
963: }
964:
965: return $this;
966: }
967:
968: /**
969: * Use the FeatureCvtermPub relation FeatureCvtermPub object
970: *
971: * @see useQuery()
972: *
973: * @param string $relationAlias optional alias for the relation,
974: * to be used as main alias in the secondary query
975: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
976: *
977: * @return \cli_db\propel\FeatureCvtermPubQuery A secondary query class using the current class as primary query
978: */
979: public function useFeatureCvtermPubQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
980: {
981: return $this
982: ->joinFeatureCvtermPub($relationAlias, $joinType)
983: ->useQuery($relationAlias ? $relationAlias : 'FeatureCvtermPub', '\cli_db\propel\FeatureCvtermPubQuery');
984: }
985:
986: /**
987: * Filter the query by a related FeaturePub object
988: *
989: * @param FeaturePub|PropelObjectCollection $featurePub the related object to use as filter
990: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
991: *
992: * @return PubQuery The current query, for fluid interface
993: * @throws PropelException - if the provided filter is invalid.
994: */
995: public function filterByFeaturePub($featurePub, $comparison = null)
996: {
997: if ($featurePub instanceof FeaturePub) {
998: return $this
999: ->addUsingAlias(PubPeer::PUB_ID, $featurePub->getPubId(), $comparison);
1000: } elseif ($featurePub instanceof PropelObjectCollection) {
1001: return $this
1002: ->useFeaturePubQuery()
1003: ->filterByPrimaryKeys($featurePub->getPrimaryKeys())
1004: ->endUse();
1005: } else {
1006: throw new PropelException('filterByFeaturePub() only accepts arguments of type FeaturePub or PropelCollection');
1007: }
1008: }
1009:
1010: /**
1011: * Adds a JOIN clause to the query using the FeaturePub relation
1012: *
1013: * @param string $relationAlias optional alias for the relation
1014: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1015: *
1016: * @return PubQuery The current query, for fluid interface
1017: */
1018: public function joinFeaturePub($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1019: {
1020: $tableMap = $this->getTableMap();
1021: $relationMap = $tableMap->getRelation('FeaturePub');
1022:
1023: // create a ModelJoin object for this join
1024: $join = new ModelJoin();
1025: $join->setJoinType($joinType);
1026: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1027: if ($previousJoin = $this->getPreviousJoin()) {
1028: $join->setPreviousJoin($previousJoin);
1029: }
1030:
1031: // add the ModelJoin to the current object
1032: if ($relationAlias) {
1033: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1034: $this->addJoinObject($join, $relationAlias);
1035: } else {
1036: $this->addJoinObject($join, 'FeaturePub');
1037: }
1038:
1039: return $this;
1040: }
1041:
1042: /**
1043: * Use the FeaturePub relation FeaturePub object
1044: *
1045: * @see useQuery()
1046: *
1047: * @param string $relationAlias optional alias for the relation,
1048: * to be used as main alias in the secondary query
1049: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1050: *
1051: * @return \cli_db\propel\FeaturePubQuery A secondary query class using the current class as primary query
1052: */
1053: public function useFeaturePubQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1054: {
1055: return $this
1056: ->joinFeaturePub($relationAlias, $joinType)
1057: ->useQuery($relationAlias ? $relationAlias : 'FeaturePub', '\cli_db\propel\FeaturePubQuery');
1058: }
1059:
1060: /**
1061: * Filter the query by a related FeatureSynonym object
1062: *
1063: * @param FeatureSynonym|PropelObjectCollection $featureSynonym the related object to use as filter
1064: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1065: *
1066: * @return PubQuery The current query, for fluid interface
1067: * @throws PropelException - if the provided filter is invalid.
1068: */
1069: public function filterByFeatureSynonym($featureSynonym, $comparison = null)
1070: {
1071: if ($featureSynonym instanceof FeatureSynonym) {
1072: return $this
1073: ->addUsingAlias(PubPeer::PUB_ID, $featureSynonym->getPubId(), $comparison);
1074: } elseif ($featureSynonym instanceof PropelObjectCollection) {
1075: return $this
1076: ->useFeatureSynonymQuery()
1077: ->filterByPrimaryKeys($featureSynonym->getPrimaryKeys())
1078: ->endUse();
1079: } else {
1080: throw new PropelException('filterByFeatureSynonym() only accepts arguments of type FeatureSynonym or PropelCollection');
1081: }
1082: }
1083:
1084: /**
1085: * Adds a JOIN clause to the query using the FeatureSynonym relation
1086: *
1087: * @param string $relationAlias optional alias for the relation
1088: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1089: *
1090: * @return PubQuery The current query, for fluid interface
1091: */
1092: public function joinFeatureSynonym($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1093: {
1094: $tableMap = $this->getTableMap();
1095: $relationMap = $tableMap->getRelation('FeatureSynonym');
1096:
1097: // create a ModelJoin object for this join
1098: $join = new ModelJoin();
1099: $join->setJoinType($joinType);
1100: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1101: if ($previousJoin = $this->getPreviousJoin()) {
1102: $join->setPreviousJoin($previousJoin);
1103: }
1104:
1105: // add the ModelJoin to the current object
1106: if ($relationAlias) {
1107: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1108: $this->addJoinObject($join, $relationAlias);
1109: } else {
1110: $this->addJoinObject($join, 'FeatureSynonym');
1111: }
1112:
1113: return $this;
1114: }
1115:
1116: /**
1117: * Use the FeatureSynonym relation FeatureSynonym object
1118: *
1119: * @see useQuery()
1120: *
1121: * @param string $relationAlias optional alias for the relation,
1122: * to be used as main alias in the secondary query
1123: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1124: *
1125: * @return \cli_db\propel\FeatureSynonymQuery A secondary query class using the current class as primary query
1126: */
1127: public function useFeatureSynonymQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1128: {
1129: return $this
1130: ->joinFeatureSynonym($relationAlias, $joinType)
1131: ->useQuery($relationAlias ? $relationAlias : 'FeatureSynonym', '\cli_db\propel\FeatureSynonymQuery');
1132: }
1133:
1134: /**
1135: * Filter the query by a related PubDbxref object
1136: *
1137: * @param PubDbxref|PropelObjectCollection $pubDbxref the related object to use as filter
1138: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1139: *
1140: * @return PubQuery The current query, for fluid interface
1141: * @throws PropelException - if the provided filter is invalid.
1142: */
1143: public function filterByPubDbxref($pubDbxref, $comparison = null)
1144: {
1145: if ($pubDbxref instanceof PubDbxref) {
1146: return $this
1147: ->addUsingAlias(PubPeer::PUB_ID, $pubDbxref->getPubId(), $comparison);
1148: } elseif ($pubDbxref instanceof PropelObjectCollection) {
1149: return $this
1150: ->usePubDbxrefQuery()
1151: ->filterByPrimaryKeys($pubDbxref->getPrimaryKeys())
1152: ->endUse();
1153: } else {
1154: throw new PropelException('filterByPubDbxref() only accepts arguments of type PubDbxref or PropelCollection');
1155: }
1156: }
1157:
1158: /**
1159: * Adds a JOIN clause to the query using the PubDbxref relation
1160: *
1161: * @param string $relationAlias optional alias for the relation
1162: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1163: *
1164: * @return PubQuery The current query, for fluid interface
1165: */
1166: public function joinPubDbxref($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1167: {
1168: $tableMap = $this->getTableMap();
1169: $relationMap = $tableMap->getRelation('PubDbxref');
1170:
1171: // create a ModelJoin object for this join
1172: $join = new ModelJoin();
1173: $join->setJoinType($joinType);
1174: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1175: if ($previousJoin = $this->getPreviousJoin()) {
1176: $join->setPreviousJoin($previousJoin);
1177: }
1178:
1179: // add the ModelJoin to the current object
1180: if ($relationAlias) {
1181: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1182: $this->addJoinObject($join, $relationAlias);
1183: } else {
1184: $this->addJoinObject($join, 'PubDbxref');
1185: }
1186:
1187: return $this;
1188: }
1189:
1190: /**
1191: * Use the PubDbxref relation PubDbxref object
1192: *
1193: * @see useQuery()
1194: *
1195: * @param string $relationAlias optional alias for the relation,
1196: * to be used as main alias in the secondary query
1197: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1198: *
1199: * @return \cli_db\propel\PubDbxrefQuery A secondary query class using the current class as primary query
1200: */
1201: public function usePubDbxrefQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1202: {
1203: return $this
1204: ->joinPubDbxref($relationAlias, $joinType)
1205: ->useQuery($relationAlias ? $relationAlias : 'PubDbxref', '\cli_db\propel\PubDbxrefQuery');
1206: }
1207:
1208: /**
1209: * Filter the query by a related PubRelationship object
1210: *
1211: * @param PubRelationship|PropelObjectCollection $pubRelationship the related object to use as filter
1212: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1213: *
1214: * @return PubQuery The current query, for fluid interface
1215: * @throws PropelException - if the provided filter is invalid.
1216: */
1217: public function filterByPubRelationshipRelatedByObjectId($pubRelationship, $comparison = null)
1218: {
1219: if ($pubRelationship instanceof PubRelationship) {
1220: return $this
1221: ->addUsingAlias(PubPeer::PUB_ID, $pubRelationship->getObjectId(), $comparison);
1222: } elseif ($pubRelationship instanceof PropelObjectCollection) {
1223: return $this
1224: ->usePubRelationshipRelatedByObjectIdQuery()
1225: ->filterByPrimaryKeys($pubRelationship->getPrimaryKeys())
1226: ->endUse();
1227: } else {
1228: throw new PropelException('filterByPubRelationshipRelatedByObjectId() only accepts arguments of type PubRelationship or PropelCollection');
1229: }
1230: }
1231:
1232: /**
1233: * Adds a JOIN clause to the query using the PubRelationshipRelatedByObjectId relation
1234: *
1235: * @param string $relationAlias optional alias for the relation
1236: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1237: *
1238: * @return PubQuery The current query, for fluid interface
1239: */
1240: public function joinPubRelationshipRelatedByObjectId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1241: {
1242: $tableMap = $this->getTableMap();
1243: $relationMap = $tableMap->getRelation('PubRelationshipRelatedByObjectId');
1244:
1245: // create a ModelJoin object for this join
1246: $join = new ModelJoin();
1247: $join->setJoinType($joinType);
1248: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1249: if ($previousJoin = $this->getPreviousJoin()) {
1250: $join->setPreviousJoin($previousJoin);
1251: }
1252:
1253: // add the ModelJoin to the current object
1254: if ($relationAlias) {
1255: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1256: $this->addJoinObject($join, $relationAlias);
1257: } else {
1258: $this->addJoinObject($join, 'PubRelationshipRelatedByObjectId');
1259: }
1260:
1261: return $this;
1262: }
1263:
1264: /**
1265: * Use the PubRelationshipRelatedByObjectId relation PubRelationship object
1266: *
1267: * @see useQuery()
1268: *
1269: * @param string $relationAlias optional alias for the relation,
1270: * to be used as main alias in the secondary query
1271: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1272: *
1273: * @return \cli_db\propel\PubRelationshipQuery A secondary query class using the current class as primary query
1274: */
1275: public function usePubRelationshipRelatedByObjectIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1276: {
1277: return $this
1278: ->joinPubRelationshipRelatedByObjectId($relationAlias, $joinType)
1279: ->useQuery($relationAlias ? $relationAlias : 'PubRelationshipRelatedByObjectId', '\cli_db\propel\PubRelationshipQuery');
1280: }
1281:
1282: /**
1283: * Filter the query by a related PubRelationship object
1284: *
1285: * @param PubRelationship|PropelObjectCollection $pubRelationship the related object to use as filter
1286: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1287: *
1288: * @return PubQuery The current query, for fluid interface
1289: * @throws PropelException - if the provided filter is invalid.
1290: */
1291: public function filterByPubRelationshipRelatedBySubjectId($pubRelationship, $comparison = null)
1292: {
1293: if ($pubRelationship instanceof PubRelationship) {
1294: return $this
1295: ->addUsingAlias(PubPeer::PUB_ID, $pubRelationship->getSubjectId(), $comparison);
1296: } elseif ($pubRelationship instanceof PropelObjectCollection) {
1297: return $this
1298: ->usePubRelationshipRelatedBySubjectIdQuery()
1299: ->filterByPrimaryKeys($pubRelationship->getPrimaryKeys())
1300: ->endUse();
1301: } else {
1302: throw new PropelException('filterByPubRelationshipRelatedBySubjectId() only accepts arguments of type PubRelationship or PropelCollection');
1303: }
1304: }
1305:
1306: /**
1307: * Adds a JOIN clause to the query using the PubRelationshipRelatedBySubjectId relation
1308: *
1309: * @param string $relationAlias optional alias for the relation
1310: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1311: *
1312: * @return PubQuery The current query, for fluid interface
1313: */
1314: public function joinPubRelationshipRelatedBySubjectId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1315: {
1316: $tableMap = $this->getTableMap();
1317: $relationMap = $tableMap->getRelation('PubRelationshipRelatedBySubjectId');
1318:
1319: // create a ModelJoin object for this join
1320: $join = new ModelJoin();
1321: $join->setJoinType($joinType);
1322: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1323: if ($previousJoin = $this->getPreviousJoin()) {
1324: $join->setPreviousJoin($previousJoin);
1325: }
1326:
1327: // add the ModelJoin to the current object
1328: if ($relationAlias) {
1329: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1330: $this->addJoinObject($join, $relationAlias);
1331: } else {
1332: $this->addJoinObject($join, 'PubRelationshipRelatedBySubjectId');
1333: }
1334:
1335: return $this;
1336: }
1337:
1338: /**
1339: * Use the PubRelationshipRelatedBySubjectId relation PubRelationship object
1340: *
1341: * @see useQuery()
1342: *
1343: * @param string $relationAlias optional alias for the relation,
1344: * to be used as main alias in the secondary query
1345: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1346: *
1347: * @return \cli_db\propel\PubRelationshipQuery A secondary query class using the current class as primary query
1348: */
1349: public function usePubRelationshipRelatedBySubjectIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1350: {
1351: return $this
1352: ->joinPubRelationshipRelatedBySubjectId($relationAlias, $joinType)
1353: ->useQuery($relationAlias ? $relationAlias : 'PubRelationshipRelatedBySubjectId', '\cli_db\propel\PubRelationshipQuery');
1354: }
1355:
1356: /**
1357: * Filter the query by a related Pubauthor object
1358: *
1359: * @param Pubauthor|PropelObjectCollection $pubauthor the related object to use as filter
1360: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1361: *
1362: * @return PubQuery The current query, for fluid interface
1363: * @throws PropelException - if the provided filter is invalid.
1364: */
1365: public function filterByPubauthor($pubauthor, $comparison = null)
1366: {
1367: if ($pubauthor instanceof Pubauthor) {
1368: return $this
1369: ->addUsingAlias(PubPeer::PUB_ID, $pubauthor->getPubId(), $comparison);
1370: } elseif ($pubauthor instanceof PropelObjectCollection) {
1371: return $this
1372: ->usePubauthorQuery()
1373: ->filterByPrimaryKeys($pubauthor->getPrimaryKeys())
1374: ->endUse();
1375: } else {
1376: throw new PropelException('filterByPubauthor() only accepts arguments of type Pubauthor or PropelCollection');
1377: }
1378: }
1379:
1380: /**
1381: * Adds a JOIN clause to the query using the Pubauthor relation
1382: *
1383: * @param string $relationAlias optional alias for the relation
1384: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1385: *
1386: * @return PubQuery The current query, for fluid interface
1387: */
1388: public function joinPubauthor($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1389: {
1390: $tableMap = $this->getTableMap();
1391: $relationMap = $tableMap->getRelation('Pubauthor');
1392:
1393: // create a ModelJoin object for this join
1394: $join = new ModelJoin();
1395: $join->setJoinType($joinType);
1396: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1397: if ($previousJoin = $this->getPreviousJoin()) {
1398: $join->setPreviousJoin($previousJoin);
1399: }
1400:
1401: // add the ModelJoin to the current object
1402: if ($relationAlias) {
1403: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1404: $this->addJoinObject($join, $relationAlias);
1405: } else {
1406: $this->addJoinObject($join, 'Pubauthor');
1407: }
1408:
1409: return $this;
1410: }
1411:
1412: /**
1413: * Use the Pubauthor relation Pubauthor object
1414: *
1415: * @see useQuery()
1416: *
1417: * @param string $relationAlias optional alias for the relation,
1418: * to be used as main alias in the secondary query
1419: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1420: *
1421: * @return \cli_db\propel\PubauthorQuery A secondary query class using the current class as primary query
1422: */
1423: public function usePubauthorQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1424: {
1425: return $this
1426: ->joinPubauthor($relationAlias, $joinType)
1427: ->useQuery($relationAlias ? $relationAlias : 'Pubauthor', '\cli_db\propel\PubauthorQuery');
1428: }
1429:
1430: /**
1431: * Filter the query by a related Pubprop object
1432: *
1433: * @param Pubprop|PropelObjectCollection $pubprop the related object to use as filter
1434: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1435: *
1436: * @return PubQuery The current query, for fluid interface
1437: * @throws PropelException - if the provided filter is invalid.
1438: */
1439: public function filterByPubprop($pubprop, $comparison = null)
1440: {
1441: if ($pubprop instanceof Pubprop) {
1442: return $this
1443: ->addUsingAlias(PubPeer::PUB_ID, $pubprop->getPubId(), $comparison);
1444: } elseif ($pubprop instanceof PropelObjectCollection) {
1445: return $this
1446: ->usePubpropQuery()
1447: ->filterByPrimaryKeys($pubprop->getPrimaryKeys())
1448: ->endUse();
1449: } else {
1450: throw new PropelException('filterByPubprop() only accepts arguments of type Pubprop or PropelCollection');
1451: }
1452: }
1453:
1454: /**
1455: * Adds a JOIN clause to the query using the Pubprop relation
1456: *
1457: * @param string $relationAlias optional alias for the relation
1458: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1459: *
1460: * @return PubQuery The current query, for fluid interface
1461: */
1462: public function joinPubprop($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1463: {
1464: $tableMap = $this->getTableMap();
1465: $relationMap = $tableMap->getRelation('Pubprop');
1466:
1467: // create a ModelJoin object for this join
1468: $join = new ModelJoin();
1469: $join->setJoinType($joinType);
1470: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1471: if ($previousJoin = $this->getPreviousJoin()) {
1472: $join->setPreviousJoin($previousJoin);
1473: }
1474:
1475: // add the ModelJoin to the current object
1476: if ($relationAlias) {
1477: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1478: $this->addJoinObject($join, $relationAlias);
1479: } else {
1480: $this->addJoinObject($join, 'Pubprop');
1481: }
1482:
1483: return $this;
1484: }
1485:
1486: /**
1487: * Use the Pubprop relation Pubprop object
1488: *
1489: * @see useQuery()
1490: *
1491: * @param string $relationAlias optional alias for the relation,
1492: * to be used as main alias in the secondary query
1493: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1494: *
1495: * @return \cli_db\propel\PubpropQuery A secondary query class using the current class as primary query
1496: */
1497: public function usePubpropQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1498: {
1499: return $this
1500: ->joinPubprop($relationAlias, $joinType)
1501: ->useQuery($relationAlias ? $relationAlias : 'Pubprop', '\cli_db\propel\PubpropQuery');
1502: }
1503:
1504: /**
1505: * Exclude object from result
1506: *
1507: * @param Pub $pub Object to remove from the list of results
1508: *
1509: * @return PubQuery The current query, for fluid interface
1510: */
1511: public function prune($pub = null)
1512: {
1513: if ($pub) {
1514: $this->addUsingAlias(PubPeer::PUB_ID, $pub->getPubId(), Criteria::NOT_EQUAL);
1515: }
1516:
1517: return $this;
1518: }
1519:
1520: }
1521: