/** * Declares an association between this object and a Privacidad object. * * @param Privacidad $v * @return Libro The current object (for fluent API support) * @throws PropelException */ public function setPrivacidad(Privacidad $v = null) { if ($v === null) { $this->setId_privacidad(NULL); } else { $this->setId_privacidad($v->getId()); } $this->aPrivacidad = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Privacidad object, it will not be re-added. if ($v !== null) { $v->addLibro($this); } return $this; }
/** * Exclude object from result * * @param Privacidad $privacidad Object to remove from the list of results * * @return PrivacidadQuery The current query, for fluid interface */ public function prune($privacidad = null) { if ($privacidad) { $this->addUsingAlias(PrivacidadPeer::ID, $privacidad->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related Privacidad object * * @param Privacidad|PropelCollection $privacidad The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LibroQuery The current query, for fluid interface */ public function filterByPrivacidad($privacidad, $comparison = null) { if ($privacidad instanceof Privacidad) { return $this->addUsingAlias(LibroPeer::ID_PRIVACIDAD, $privacidad->getId(), $comparison); } elseif ($privacidad instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(LibroPeer::ID_PRIVACIDAD, $privacidad->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByPrivacidad() only accepts arguments of type Privacidad or PropelCollection'); } }