/** * Filter the query by a related \Mediafile object * * @param \Mediafile|ObjectCollection $mediafile The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildJpegFileQuery The current query, for fluid interface */ public function filterByMediafile($mediafile, $comparison = null) { if ($mediafile instanceof \Mediafile) { return $this->addUsingAlias(JpegFileTableMap::COL_MEDIAFILE_IDMEDIAFILE, $mediafile->getIdmediafile(), $comparison); } elseif ($mediafile instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(JpegFileTableMap::COL_MEDIAFILE_IDMEDIAFILE, $mediafile->toKeyValue('PrimaryKey', 'Idmediafile'), $comparison); } else { throw new PropelException('filterByMediafile() only accepts arguments of type \\Mediafile or Collection'); } }
/** * Declares an association between this object and a ChildMediafile object. * * @param ChildMediafile $v * @return $this|\FileMeta The current object (for fluent API support) * @throws PropelException */ public function setMediafile(ChildMediafile $v = null) { if ($v === null) { $this->setMediafileIdmediafile(NULL); } else { $this->setMediafileIdmediafile($v->getIdmediafile()); } $this->aMediafile = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildMediafile object, it will not be re-added. if ($v !== null) { $v->addFileMeta($this); } return $this; }
/** * Declares an association between this object and a ChildMediafile object. * * @param ChildMediafile $v * @return $this|\JpegFile The current object (for fluent API support) * @throws PropelException */ public function setMediafile(ChildMediafile $v = null) { if ($v === null) { $this->setMediafileIdmediafile(NULL); } else { $this->setMediafileIdmediafile($v->getIdmediafile()); } $this->aMediafile = $v; // Add binding for other direction of this 1:1 relationship. if ($v !== null) { $v->setJpegFile($this); } return $this; }
/** * Exclude object from result * * @param ChildMediafile $mediafile Object to remove from the list of results * * @return $this|ChildMediafileQuery The current query, for fluid interface */ public function prune($mediafile = null) { if ($mediafile) { $this->addUsingAlias(MediafileTableMap::COL_IDMEDIAFILE, $mediafile->getIdmediafile(), Criteria::NOT_EQUAL); } return $this; }