propel rename done for template fields, template name input.

This commit is contained in:
Naomi 2013-07-29 17:21:46 -04:00
parent db4e025c05
commit 8eecbb18c0
17 changed files with 2607 additions and 74 deletions

View file

@ -37,9 +37,9 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
protected $template_name;
/**
* @var array CcPlayoutHistoryTemplateTag[] Collection to store aggregation of CcPlayoutHistoryTemplateTag objects.
* @var array CcPlayoutHistoryTemplateField[] Collection to store aggregation of CcPlayoutHistoryTemplateField objects.
*/
protected $collCcPlayoutHistoryTemplateTags;
protected $collCcPlayoutHistoryTemplateFields;
/**
* Flag to prevent endless save loop, if this object is referenced
@ -219,7 +219,7 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
if ($deep) { // also de-associate any related objects?
$this->collCcPlayoutHistoryTemplateTags = null;
$this->collCcPlayoutHistoryTemplateFields = null;
} // if (deep)
}
@ -354,8 +354,8 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
if ($this->collCcPlayoutHistoryTemplateTags !== null) {
foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) {
if ($this->collCcPlayoutHistoryTemplateFields !== null) {
foreach ($this->collCcPlayoutHistoryTemplateFields as $referrerFK) {
if (!$referrerFK->isDeleted()) {
$affectedRows += $referrerFK->save($con);
}
@ -433,8 +433,8 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
}
if ($this->collCcPlayoutHistoryTemplateTags !== null) {
foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) {
if ($this->collCcPlayoutHistoryTemplateFields !== null) {
foreach ($this->collCcPlayoutHistoryTemplateFields as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
@ -649,9 +649,9 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
foreach ($this->getCcPlayoutHistoryTemplateTags() as $relObj) {
foreach ($this->getCcPlayoutHistoryTemplateFields() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcPlayoutHistoryTemplateTag($relObj->copy($deepCopy));
$copyObj->addCcPlayoutHistoryTemplateField($relObj->copy($deepCopy));
}
}
@ -701,36 +701,36 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
}
/**
* Clears out the collCcPlayoutHistoryTemplateTags collection
* Clears out the collCcPlayoutHistoryTemplateFields collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @see addCcPlayoutHistoryTemplateTags()
* @see addCcPlayoutHistoryTemplateFields()
*/
public function clearCcPlayoutHistoryTemplateTags()
public function clearCcPlayoutHistoryTemplateFields()
{
$this->collCcPlayoutHistoryTemplateTags = null; // important to set this to NULL since that means it is uninitialized
$this->collCcPlayoutHistoryTemplateFields = null; // important to set this to NULL since that means it is uninitialized
}
/**
* Initializes the collCcPlayoutHistoryTemplateTags collection.
* Initializes the collCcPlayoutHistoryTemplateFields collection.
*
* By default this just sets the collCcPlayoutHistoryTemplateTags collection to an empty array (like clearcollCcPlayoutHistoryTemplateTags());
* By default this just sets the collCcPlayoutHistoryTemplateFields collection to an empty array (like clearcollCcPlayoutHistoryTemplateFields());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @return void
*/
public function initCcPlayoutHistoryTemplateTags()
public function initCcPlayoutHistoryTemplateFields()
{
$this->collCcPlayoutHistoryTemplateTags = new PropelObjectCollection();
$this->collCcPlayoutHistoryTemplateTags->setModel('CcPlayoutHistoryTemplateTag');
$this->collCcPlayoutHistoryTemplateFields = new PropelObjectCollection();
$this->collCcPlayoutHistoryTemplateFields->setModel('CcPlayoutHistoryTemplateField');
}
/**
* Gets an array of CcPlayoutHistoryTemplateTag objects which contain a foreign key that references this object.
* Gets an array of CcPlayoutHistoryTemplateField objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
@ -740,44 +740,44 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects
* @return PropelCollection|array CcPlayoutHistoryTemplateField[] List of CcPlayoutHistoryTemplateField objects
* @throws PropelException
*/
public function getCcPlayoutHistoryTemplateTags($criteria = null, PropelPDO $con = null)
public function getCcPlayoutHistoryTemplateFields($criteria = null, PropelPDO $con = null)
{
if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) {
if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) {
if(null === $this->collCcPlayoutHistoryTemplateFields || null !== $criteria) {
if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateFields) {
// return empty collection
$this->initCcPlayoutHistoryTemplateTags();
$this->initCcPlayoutHistoryTemplateFields();
} else {
$collCcPlayoutHistoryTemplateTags = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria)
$collCcPlayoutHistoryTemplateFields = CcPlayoutHistoryTemplateFieldQuery::create(null, $criteria)
->filterByCcPlayoutHistoryTemplate($this)
->find($con);
if (null !== $criteria) {
return $collCcPlayoutHistoryTemplateTags;
return $collCcPlayoutHistoryTemplateFields;
}
$this->collCcPlayoutHistoryTemplateTags = $collCcPlayoutHistoryTemplateTags;
$this->collCcPlayoutHistoryTemplateFields = $collCcPlayoutHistoryTemplateFields;
}
}
return $this->collCcPlayoutHistoryTemplateTags;
return $this->collCcPlayoutHistoryTemplateFields;
}
/**
* Returns the number of related CcPlayoutHistoryTemplateTag objects.
* Returns the number of related CcPlayoutHistoryTemplateField objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CcPlayoutHistoryTemplateTag objects.
* @return int Count of related CcPlayoutHistoryTemplateField objects.
* @throws PropelException
*/
public function countCcPlayoutHistoryTemplateTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
public function countCcPlayoutHistoryTemplateFields(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) {
if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) {
if(null === $this->collCcPlayoutHistoryTemplateFields || null !== $criteria) {
if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateFields) {
return 0;
} else {
$query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria);
$query = CcPlayoutHistoryTemplateFieldQuery::create(null, $criteria);
if($distinct) {
$query->distinct();
}
@ -786,25 +786,25 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
->count($con);
}
} else {
return count($this->collCcPlayoutHistoryTemplateTags);
return count($this->collCcPlayoutHistoryTemplateFields);
}
}
/**
* Method called to associate a CcPlayoutHistoryTemplateTag object to this object
* through the CcPlayoutHistoryTemplateTag foreign key attribute.
* Method called to associate a CcPlayoutHistoryTemplateField object to this object
* through the CcPlayoutHistoryTemplateField foreign key attribute.
*
* @param CcPlayoutHistoryTemplateTag $l CcPlayoutHistoryTemplateTag
* @param CcPlayoutHistoryTemplateField $l CcPlayoutHistoryTemplateField
* @return void
* @throws PropelException
*/
public function addCcPlayoutHistoryTemplateTag(CcPlayoutHistoryTemplateTag $l)
public function addCcPlayoutHistoryTemplateField(CcPlayoutHistoryTemplateField $l)
{
if ($this->collCcPlayoutHistoryTemplateTags === null) {
$this->initCcPlayoutHistoryTemplateTags();
if ($this->collCcPlayoutHistoryTemplateFields === null) {
$this->initCcPlayoutHistoryTemplateFields();
}
if (!$this->collCcPlayoutHistoryTemplateTags->contains($l)) { // only add it if the **same** object is not already associated
$this->collCcPlayoutHistoryTemplateTags[]= $l;
if (!$this->collCcPlayoutHistoryTemplateFields->contains($l)) { // only add it if the **same** object is not already associated
$this->collCcPlayoutHistoryTemplateFields[]= $l;
$l->setCcPlayoutHistoryTemplate($this);
}
}
@ -836,14 +836,14 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($this->collCcPlayoutHistoryTemplateTags) {
foreach ((array) $this->collCcPlayoutHistoryTemplateTags as $o) {
if ($this->collCcPlayoutHistoryTemplateFields) {
foreach ((array) $this->collCcPlayoutHistoryTemplateFields as $o) {
$o->clearAllReferences($deep);
}
}
} // if ($deep)
$this->collCcPlayoutHistoryTemplateTags = null;
$this->collCcPlayoutHistoryTemplateFields = null;
}
/**