]> wagnertech.de Git - projects.git/blobdiff - verleihnix/Verleihnix/impl/data/build/classes/propel/om/BaseKrimiQuery.php
verleihnix komplett eingescheckt
[projects.git] / verleihnix / Verleihnix / impl / data / build / classes / propel / om / BaseKrimiQuery.php
diff --git a/verleihnix/Verleihnix/impl/data/build/classes/propel/om/BaseKrimiQuery.php b/verleihnix/Verleihnix/impl/data/build/classes/propel/om/BaseKrimiQuery.php
new file mode 100644 (file)
index 0000000..f671bd6
--- /dev/null
@@ -0,0 +1,109 @@
+<?php
+
+
+/**
+ * Skeleton subclass for representing a query for one of the subclasses of the 'medium' table.
+ *
+ *
+ *
+ * You should add additional methods to this class to meet the
+ * application requirements.  This class will only be generated as
+ * long as it does not already exist in the output directory.
+ *
+ * @package    propel.generator.propel.om
+ */
+class BaseKrimiQuery extends MediumQuery {
+
+    /**
+     * Returns a new KrimiQuery object.
+     *
+     * @param     string $modelAlias The alias of a model in the query
+     * @param     Criteria $criteria Optional Criteria to build the query from
+     *
+     * @return KrimiQuery
+     */
+    public static function create($modelAlias = null, $criteria = null)
+    {
+        if ($criteria instanceof KrimiQuery) {
+            return $criteria;
+        }
+        $query = new KrimiQuery();
+        if (null !== $modelAlias) {
+            $query->setModelAlias($modelAlias);
+        }
+        if ($criteria instanceof Criteria) {
+            $query->mergeWith($criteria);
+        }
+
+        return $query;
+    }
+
+    /**
+     * Filters the query to target only Krimi objects.
+     */
+    public function preSelect(PropelPDO $con)
+    {
+        $this->addUsingAlias(MediumPeer::CLASS_KEY, MediumPeer::CLASSKEY_1);
+    }
+
+    /**
+     * Filters the query to target only Krimi objects.
+     */
+    public function preUpdate(&$values, PropelPDO $con, $forceIndividualSaves = false)
+    {
+        $this->addUsingAlias(MediumPeer::CLASS_KEY, MediumPeer::CLASSKEY_1);
+    }
+
+    /**
+     * Filters the query to target only Krimi objects.
+     */
+    public function preDelete(PropelPDO $con)
+    {
+        $this->addUsingAlias(MediumPeer::CLASS_KEY, MediumPeer::CLASSKEY_1);
+    }
+
+    /**
+     * Issue a DELETE query based on the current ModelCriteria deleting all rows in the table
+     * Having the Krimi class.
+     * This method is called by ModelCriteria::deleteAll() inside a transaction
+     *
+     * @param PropelPDO $con a connection object
+     *
+     * @return integer the number of deleted rows
+     */
+    public function doDeleteAll($con)
+    {
+        // condition on class key is already added in preDelete()
+        return parent::doDelete($con);
+    }
+
+
+    /**
+     * Issue a SELECT ... LIMIT 1 query based on the current ModelCriteria
+     * and format the result with the current formatter
+     * By default, returns a model object
+     *
+     * @param PropelPDO $con an optional connection object
+     *
+     * @return mixed the result, formatted by the current formatter
+     *
+     * @throws PropelException
+     */
+    public function findOneOrCreate($con = null)
+    {
+        if ($this->joins) {
+            throw new PropelException('findOneOrCreate() cannot be used on a query with a join, because Propel cannot transform a SQL JOIN into a subquery. You should split the query in two queries to avoid joins.');
+        }
+        if (!$ret = $this->findOne($con)) {
+            $class = MediumPeer::CLASSNAME_1;
+            $obj = new $class;
+            foreach ($this->keys() as $key) {
+                $obj->setByName($key, $this->getValue($key), BasePeer::TYPE_COLNAME);
+            }
+            $ret = $this->getFormatter()->formatRecord($obj);
+        }
+
+        return $ret;
+    }
+
+} // BaseKrimiQuery