Esempio n. 1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aInvoice) {
         $this->aInvoice->removeBill($this);
     }
     if (null !== $this->aTask) {
         $this->aTask->removeBill($this);
     }
     $this->task_id = null;
     $this->invoice_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Esempio n. 2
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aInvoice) {
         $this->aInvoice->removeReminder($this);
     }
     if (null !== $this->aReminderlevel) {
         $this->aReminderlevel->removeReminder($this);
     }
     $this->id = null;
     $this->invoice_id = null;
     $this->reminderlevel_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Esempio n. 3
0
 /**
  * Filter the query by a related \Invoice object
  *
  * @param \Invoice|ObjectCollection $invoice the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCustomerQuery The current query, for fluid interface
  */
 public function filterByInvoice($invoice, $comparison = null)
 {
     if ($invoice instanceof \Invoice) {
         return $this->addUsingAlias(CustomerTableMap::COL_ID, $invoice->getCustomerId(), $comparison);
     } elseif ($invoice instanceof ObjectCollection) {
         return $this->useInvoiceQuery()->filterByPrimaryKeys($invoice->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByInvoice() only accepts arguments of type \\Invoice or Collection');
     }
 }
Esempio n. 4
0
 /**
  * @param ChildInvoice $invoice The ChildInvoice object to add.
  */
 protected function doAddInvoice(ChildInvoice $invoice)
 {
     $this->collInvoices[] = $invoice;
     $invoice->setCustomer($this);
 }
Esempio n. 5
0
 /**
  * Filter the query by a related \Invoice object
  *
  * @param \Invoice|ObjectCollection $invoice 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 ChildReminderQuery The current query, for fluid interface
  */
 public function filterByInvoice($invoice, $comparison = null)
 {
     if ($invoice instanceof \Invoice) {
         return $this->addUsingAlias(ReminderTableMap::COL_INVOICE_ID, $invoice->getId(), $comparison);
     } elseif ($invoice instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ReminderTableMap::COL_INVOICE_ID, $invoice->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByInvoice() only accepts arguments of type \\Invoice or Collection');
     }
 }
Esempio n. 6
0
 /**
  * Exclude object from result
  *
  * @param   ChildInvoice $invoice Object to remove from the list of results
  *
  * @return $this|ChildInvoiceQuery The current query, for fluid interface
  */
 public function prune($invoice = null)
 {
     if ($invoice) {
         $this->addUsingAlias(InvoiceTableMap::COL_ID, $invoice->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }