cc-2977: getting close!!!

This commit is contained in:
James 2012-01-06 15:47:11 -05:00
parent 905775552d
commit 61c5355e8a
13 changed files with 323 additions and 70 deletions

View file

@ -42,6 +42,13 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
*/
protected $type;
/**
* The value for the removed field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $removed;
/**
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
*/
@ -61,6 +68,27 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Applies default values to this object.
* This method should be called from the object's constructor (or
* equivalent initialization method).
* @see __construct()
*/
public function applyDefaultValues()
{
$this->removed = false;
}
/**
* Initializes internal state of BaseCcMusicDirs object.
* @see applyDefaults()
*/
public function __construct()
{
parent::__construct();
$this->applyDefaultValues();
}
/**
* Get the [id] column value.
*
@ -91,6 +119,16 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
return $this->type;
}
/**
* Get the [removed] column value.
*
* @return boolean
*/
public function getRemoved()
{
return $this->removed;
}
/**
* Set the value of [id] column.
*
@ -151,6 +189,26 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
return $this;
} // setType()
/**
* Set the value of [removed] column.
*
* @param boolean $v new value
* @return CcMusicDirs The current object (for fluent API support)
*/
public function setRemoved($v)
{
if ($v !== null) {
$v = (boolean) $v;
}
if ($this->removed !== $v || $this->isNew()) {
$this->removed = $v;
$this->modifiedColumns[] = CcMusicDirsPeer::REMOVED;
}
return $this;
} // setRemoved()
/**
* Indicates whether the columns in this object are only set to default values.
*
@ -161,6 +219,10 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
*/
public function hasOnlyDefaultValues()
{
if ($this->removed !== false) {
return false;
}
// otherwise, everything was equal, so return TRUE
return true;
} // hasOnlyDefaultValues()
@ -186,6 +248,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->directory = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->removed = ($row[$startcol + 3] !== null) ? (boolean) $row[$startcol + 3] : null;
$this->resetModified();
$this->setNew(false);
@ -194,7 +257,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
$this->ensureConsistency();
}
return $startcol + 3; // 3 = CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 4; // 4 = CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcMusicDirs object", $e);
@ -520,6 +583,9 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
case 2:
return $this->getType();
break;
case 3:
return $this->getRemoved();
break;
default:
return null;
break;
@ -546,6 +612,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
$keys[0] => $this->getId(),
$keys[1] => $this->getDirectory(),
$keys[2] => $this->getType(),
$keys[3] => $this->getRemoved(),
);
return $result;
}
@ -586,6 +653,9 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
case 2:
$this->setType($value);
break;
case 3:
$this->setRemoved($value);
break;
} // switch()
}
@ -613,6 +683,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setDirectory($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setRemoved($arr[$keys[3]]);
}
/**
@ -627,6 +698,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
if ($this->isColumnModified(CcMusicDirsPeer::ID)) $criteria->add(CcMusicDirsPeer::ID, $this->id);
if ($this->isColumnModified(CcMusicDirsPeer::DIRECTORY)) $criteria->add(CcMusicDirsPeer::DIRECTORY, $this->directory);
if ($this->isColumnModified(CcMusicDirsPeer::TYPE)) $criteria->add(CcMusicDirsPeer::TYPE, $this->type);
if ($this->isColumnModified(CcMusicDirsPeer::REMOVED)) $criteria->add(CcMusicDirsPeer::REMOVED, $this->removed);
return $criteria;
}
@ -690,6 +762,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
{
$copyObj->setDirectory($this->directory);
$copyObj->setType($this->type);
$copyObj->setRemoved($this->removed);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@ -889,9 +962,11 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
$this->id = null;
$this->directory = null;
$this->type = null;
$this->removed = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
$this->applyDefaultValues();
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);