setModelAlias($modelAlias); } if ($criteria instanceof Criteria) { $query->mergeWith($criteria); } return $query; } /** * Find object by primary key * Use instance pooling to avoid a database query if the object exists * * $obj = $c->findPk(12, $con); * * @param mixed $key Primary key to use for the query * @param PropelPDO $con an optional connection object * * @return Mitarbeiter|array|mixed the result, formatted by the current formatter */ public function findPk($key, $con = null) { if ((null !== ($obj = MitarbeiterPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { // the object is alredy in the instance pool return $obj; } else { // the object has not been requested yet, or the formatter is not an object formatter $criteria = $this->isKeepQuery() ? clone $this : $this; $stmt = $criteria ->filterByPrimaryKey($key) ->getSelectStatement($con); return $criteria->getFormatter()->init($criteria)->formatOne($stmt); } } /** * Find objects by primary key * * $objs = $c->findPks(array(12, 56, 832), $con); * * @param array $keys Primary keys to use for the query * @param PropelPDO $con an optional connection object * * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter */ public function findPks($keys, $con = null) { $criteria = $this->isKeepQuery() ? clone $this : $this; return $this ->filterByPrimaryKeys($keys) ->find($con); } /** * Filter the query by primary key * * @param mixed $key Primary key to use for the query * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { return $this->addUsingAlias(MitarbeiterPeer::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * * @param array $keys The list of primary key to use for the query * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { return $this->addUsingAlias(MitarbeiterPeer::ID, $keys, Criteria::IN); } /** * Filter the query on the id column * * @param int|array $id The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterById($id = null, $comparison = null) { if (is_array($id) && null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(MitarbeiterPeer::ID, $id, $comparison); } /** * Filter the query on the mod column * * @param int|array $mod The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByMod($mod = null, $comparison = null) { if (is_array($mod)) { $useMinMax = false; if (isset($mod['min'])) { $this->addUsingAlias(MitarbeiterPeer::MOD, $mod['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($mod['max'])) { $this->addUsingAlias(MitarbeiterPeer::MOD, $mod['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MitarbeiterPeer::MOD, $mod, $comparison); } /** * Filter the query on the name column * * @param string $name The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByName($name = null, $comparison = null) { if (null === $comparison) { if (is_array($name)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $name)) { $name = str_replace('*', '%', $name); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::NAME, $name, $comparison); } /** * Filter the query on the vorname column * * @param string $vorname The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByVorname($vorname = null, $comparison = null) { if (null === $comparison) { if (is_array($vorname)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $vorname)) { $vorname = str_replace('*', '%', $vorname); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::VORNAME, $vorname, $comparison); } /** * Filter the query on the anrede column * * @param string $anrede The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByAnrede($anrede = null, $comparison = null) { if (null === $comparison) { if (is_array($anrede)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $anrede)) { $anrede = str_replace('*', '%', $anrede); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::ANREDE, $anrede, $comparison); } /** * Filter the query on the strasse column * * @param string $strasse The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByStrasse($strasse = null, $comparison = null) { if (null === $comparison) { if (is_array($strasse)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $strasse)) { $strasse = str_replace('*', '%', $strasse); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::STRASSE, $strasse, $comparison); } /** * Filter the query on the plz column * * @param string $plz The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByPlz($plz = null, $comparison = null) { if (null === $comparison) { if (is_array($plz)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $plz)) { $plz = str_replace('*', '%', $plz); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::PLZ, $plz, $comparison); } /** * Filter the query on the ort column * * @param string $ort The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByOrt($ort = null, $comparison = null) { if (null === $comparison) { if (is_array($ort)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $ort)) { $ort = str_replace('*', '%', $ort); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::ORT, $ort, $comparison); } /** * Filter the query on the kontonummer column * * @param string $kontonummer The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByKontonummer($kontonummer = null, $comparison = null) { if (null === $comparison) { if (is_array($kontonummer)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $kontonummer)) { $kontonummer = str_replace('*', '%', $kontonummer); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::KONTONUMMER, $kontonummer, $comparison); } /** * Filter the query on the blz column * * @param string $blz The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByBlz($blz = null, $comparison = null) { if (null === $comparison) { if (is_array($blz)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $blz)) { $blz = str_replace('*', '%', $blz); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::BLZ, $blz, $comparison); } /** * Filter the query on the bank column * * @param string $bank The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByBank($bank = null, $comparison = null) { if (null === $comparison) { if (is_array($bank)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $bank)) { $bank = str_replace('*', '%', $bank); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::BANK, $bank, $comparison); } /** * Filter the query on the email column * * @param string $email The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByEmail($email = null, $comparison = null) { if (null === $comparison) { if (is_array($email)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $email)) { $email = str_replace('*', '%', $email); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::EMAIL, $email, $comparison); } /** * Filter the query on the basis_betrag column * * @param string|array $basisBetrag The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByBasisBetrag($basisBetrag = null, $comparison = null) { if (is_array($basisBetrag)) { $useMinMax = false; if (isset($basisBetrag['min'])) { $this->addUsingAlias(MitarbeiterPeer::BASIS_BETRAG, $basisBetrag['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($basisBetrag['max'])) { $this->addUsingAlias(MitarbeiterPeer::BASIS_BETRAG, $basisBetrag['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MitarbeiterPeer::BASIS_BETRAG, $basisBetrag, $comparison); } /** * Filter the query on the periode column * * @param int|array $periode The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByPeriode($periode = null, $comparison = null) { if (is_array($periode)) { $useMinMax = false; if (isset($periode['min'])) { $this->addUsingAlias(MitarbeiterPeer::PERIODE, $periode['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($periode['max'])) { $this->addUsingAlias(MitarbeiterPeer::PERIODE, $periode['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MitarbeiterPeer::PERIODE, $periode, $comparison); } /** * Filter the query on the steuermerkmal column * * @param string $steuermerkmal The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterBySteuermerkmal($steuermerkmal = null, $comparison = null) { if (null === $comparison) { if (is_array($steuermerkmal)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $steuermerkmal)) { $steuermerkmal = str_replace('*', '%', $steuermerkmal); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(MitarbeiterPeer::STEUERMERKMAL, $steuermerkmal, $comparison); } /** * Filter the query on the aktiv column * * @param boolean|string $aktiv The value to use as filter. * Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByAktiv($aktiv = null, $comparison = null) { if (is_string($aktiv)) { $aktiv = in_array(strtolower($aktiv), array('false', 'off', '-', 'no', 'n', '0')) ? false : true; } return $this->addUsingAlias(MitarbeiterPeer::AKTIV, $aktiv, $comparison); } /** * Filter the query on the lp_id column * * @param int|array $lpId The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByLpId($lpId = null, $comparison = null) { if (is_array($lpId)) { $useMinMax = false; if (isset($lpId['min'])) { $this->addUsingAlias(MitarbeiterPeer::LP_ID, $lpId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($lpId['max'])) { $this->addUsingAlias(MitarbeiterPeer::LP_ID, $lpId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MitarbeiterPeer::LP_ID, $lpId, $comparison); } /** * Filter the query by a related Lohnprofil object * * @param Lohnprofil $lohnprofil the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByLohnprofil($lohnprofil, $comparison = null) { return $this ->addUsingAlias(MitarbeiterPeer::LP_ID, $lohnprofil->getId(), $comparison); } /** * Adds a JOIN clause to the query using the Lohnprofil relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return MitarbeiterQuery The current query, for fluid interface */ public function joinLohnprofil($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('Lohnprofil'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'Lohnprofil'); } return $this; } /** * Use the Lohnprofil relation Lohnprofil object * * @see useQuery() * * @param string $relationAlias optional alias for the relation, * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return LohnprofilQuery A secondary query class using the current class as primary query */ public function useLohnprofilQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinLohnprofil($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Lohnprofil', 'LohnprofilQuery'); } /** * Filter the query by a related Lohnabrechnung object * * @param Lohnabrechnung $lohnabrechnung the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MitarbeiterQuery The current query, for fluid interface */ public function filterByLA($lohnabrechnung, $comparison = null) { return $this ->addUsingAlias(MitarbeiterPeer::ID, $lohnabrechnung->getMaId(), $comparison); } /** * Adds a JOIN clause to the query using the LA relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return MitarbeiterQuery The current query, for fluid interface */ public function joinLA($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('LA'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'LA'); } return $this; } /** * Use the LA relation Lohnabrechnung object * * @see useQuery() * * @param string $relationAlias optional alias for the relation, * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return LohnabrechnungQuery A secondary query class using the current class as primary query */ public function useLAQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinLA($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'LA', 'LohnabrechnungQuery'); } /** * Exclude object from result * * @param Mitarbeiter $mitarbeiter Object to remove from the list of results * * @return MitarbeiterQuery The current query, for fluid interface */ public function prune($mitarbeiter = null) { if ($mitarbeiter) { $this->addUsingAlias(MitarbeiterPeer::ID, $mitarbeiter->getId(), Criteria::NOT_EQUAL); } return $this; } } // BaseMitarbeiterQuery