PM-947
This commit is contained in:
@@ -75,6 +75,8 @@ class DynaformMapBuilder
|
||||
|
||||
$tMap->addColumn('DYN_CONTENT', 'DynContent', 'string', CreoleTypes::LONGVARCHAR, false, null);
|
||||
|
||||
$tMap->addColumn('DYN_LABEL', 'DynLabel', 'string', CreoleTypes::LONGVARCHAR, false, null);
|
||||
|
||||
$tMap->addColumn('DYN_VERSION', 'DynVersion', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addValidator('DYN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'xmlform|grid', 'Please select a valid dynaform type.');
|
||||
|
||||
@@ -57,6 +57,12 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $dyn_content;
|
||||
|
||||
/**
|
||||
* The value for the dyn_label field.
|
||||
* @var string
|
||||
*/
|
||||
protected $dyn_label;
|
||||
|
||||
/**
|
||||
* The value for the dyn_version field.
|
||||
* @var int
|
||||
@@ -132,6 +138,17 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
return $this->dyn_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [dyn_label] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDynLabel()
|
||||
{
|
||||
|
||||
return $this->dyn_label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [dyn_version] column value.
|
||||
*
|
||||
@@ -253,6 +270,28 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
} // setDynContent()
|
||||
|
||||
/**
|
||||
* Set the value of [dyn_label] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setDynLabel($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->dyn_label !== $v) {
|
||||
$this->dyn_label = $v;
|
||||
$this->modifiedColumns[] = DynaformPeer::DYN_LABEL;
|
||||
}
|
||||
|
||||
} // setDynLabel()
|
||||
|
||||
/**
|
||||
* Set the value of [dyn_version] column.
|
||||
*
|
||||
@@ -302,14 +341,16 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
$this->dyn_content = $rs->getString($startcol + 4);
|
||||
|
||||
$this->dyn_version = $rs->getInt($startcol + 5);
|
||||
$this->dyn_label = $rs->getString($startcol + 5);
|
||||
|
||||
$this->dyn_version = $rs->getInt($startcol + 6);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 6; // 6 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 7; // 7 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Dynaform object", $e);
|
||||
@@ -529,6 +570,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
return $this->getDynContent();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getDynLabel();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getDynVersion();
|
||||
break;
|
||||
default:
|
||||
@@ -556,7 +600,8 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$keys[2] => $this->getDynType(),
|
||||
$keys[3] => $this->getDynFilename(),
|
||||
$keys[4] => $this->getDynContent(),
|
||||
$keys[5] => $this->getDynVersion(),
|
||||
$keys[5] => $this->getDynLabel(),
|
||||
$keys[6] => $this->getDynVersion(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -604,6 +649,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$this->setDynContent($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setDynLabel($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setDynVersion($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -650,7 +698,11 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[5], $arr)) {
|
||||
$this->setDynVersion($arr[$keys[5]]);
|
||||
$this->setDynLabel($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[6], $arr)) {
|
||||
$this->setDynVersion($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -684,6 +736,10 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$criteria->add(DynaformPeer::DYN_CONTENT, $this->dyn_content);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(DynaformPeer::DYN_LABEL)) {
|
||||
$criteria->add(DynaformPeer::DYN_LABEL, $this->dyn_label);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(DynaformPeer::DYN_VERSION)) {
|
||||
$criteria->add(DynaformPeer::DYN_VERSION, $this->dyn_version);
|
||||
}
|
||||
@@ -750,6 +806,8 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setDynContent($this->dyn_content);
|
||||
|
||||
$copyObj->setDynLabel($this->dyn_label);
|
||||
|
||||
$copyObj->setDynVersion($this->dyn_version);
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseDynaformPeer
|
||||
const CLASS_DEFAULT = 'classes.model.Dynaform';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 6;
|
||||
const NUM_COLUMNS = 7;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -46,6 +46,9 @@ abstract class BaseDynaformPeer
|
||||
/** the column name for the DYN_CONTENT field */
|
||||
const DYN_CONTENT = 'DYNAFORM.DYN_CONTENT';
|
||||
|
||||
/** the column name for the DYN_LABEL field */
|
||||
const DYN_LABEL = 'DYNAFORM.DYN_LABEL';
|
||||
|
||||
/** the column name for the DYN_VERSION field */
|
||||
const DYN_VERSION = 'DYNAFORM.DYN_VERSION';
|
||||
|
||||
@@ -60,10 +63,10 @@ abstract class BaseDynaformPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', 'DynContent', 'DynVersion', ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID, DynaformPeer::PRO_UID, DynaformPeer::DYN_TYPE, DynaformPeer::DYN_FILENAME, DynaformPeer::DYN_CONTENT, DynaformPeer::DYN_VERSION, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', 'DYN_CONTENT', 'DYN_VERSION', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', 'DynContent', 'DynLabel', 'DynVersion', ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID, DynaformPeer::PRO_UID, DynaformPeer::DYN_TYPE, DynaformPeer::DYN_FILENAME, DynaformPeer::DYN_CONTENT, DynaformPeer::DYN_LABEL, DynaformPeer::DYN_VERSION, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', 'DYN_CONTENT', 'DYN_LABEL', 'DYN_VERSION', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -73,10 +76,10 @@ abstract class BaseDynaformPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, 'DynContent' => 4, 'DynVersion' => 5, ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID => 0, DynaformPeer::PRO_UID => 1, DynaformPeer::DYN_TYPE => 2, DynaformPeer::DYN_FILENAME => 3, DynaformPeer::DYN_CONTENT => 4, DynaformPeer::DYN_VERSION => 5, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID' => 0, 'PRO_UID' => 1, 'DYN_TYPE' => 2, 'DYN_FILENAME' => 3, 'DYN_CONTENT' => 4, 'DYN_VERSION' => 5, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, 'DynContent' => 4, 'DynLabel' => 5, 'DynVersion' => 6, ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID => 0, DynaformPeer::PRO_UID => 1, DynaformPeer::DYN_TYPE => 2, DynaformPeer::DYN_FILENAME => 3, DynaformPeer::DYN_CONTENT => 4, DynaformPeer::DYN_LABEL => 5, DynaformPeer::DYN_VERSION => 6, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID' => 0, 'PRO_UID' => 1, 'DYN_TYPE' => 2, 'DYN_FILENAME' => 3, 'DYN_CONTENT' => 4, 'DYN_LABEL' => 5, 'DYN_VERSION' => 6, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -187,6 +190,8 @@ abstract class BaseDynaformPeer
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_LABEL);
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_VERSION);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user