Exemple #1
0
 /**
  * Gets a single ChildJpegFile object, which is related to this object by a one-to-one relationship.
  *
  * @param  ConnectionInterface $con optional connection object
  * @return ChildJpegFile
  * @throws PropelException
  */
 public function getJpegFile(ConnectionInterface $con = null)
 {
     if ($this->singleJpegFile === null && !$this->isNew()) {
         $this->singleJpegFile = ChildJpegFileQuery::create()->findPk($this->getPrimaryKey(), $con);
     }
     return $this->singleJpegFile;
 }
Exemple #2
0
 /**
  * Returns a new ChildJpegFileQuery object.
  *
  * @param     string $modelAlias The alias of a model in the query
  * @param     Criteria $criteria Optional Criteria to build the query from
  *
  * @return ChildJpegFileQuery
  */
 public static function create($modelAlias = null, Criteria $criteria = null)
 {
     if ($criteria instanceof ChildJpegFileQuery) {
         return $criteria;
     }
     $query = new ChildJpegFileQuery();
     if (null !== $modelAlias) {
         $query->setModelAlias($modelAlias);
     }
     if ($criteria instanceof Criteria) {
         $query->mergeWith($criteria);
     }
     return $query;
 }
Exemple #3
0
 /**
  * Builds a Criteria object containing the primary key for this object.
  *
  * Unlike buildCriteria() this method includes the primary key values regardless
  * of whether or not they have been modified.
  *
  * @throws LogicException if no primary key is defined
  *
  * @return Criteria The Criteria object containing value(s) for primary key(s).
  */
 public function buildPkeyCriteria()
 {
     $criteria = ChildJpegFileQuery::create();
     $criteria->add(JpegFileTableMap::COL_MEDIAFILE_IDMEDIAFILE, $this->mediafile_idmediafile);
     return $criteria;
 }