Merged in dheeyi/processmaker/PM-3025 (pull request #2410)

Pm 3025
This commit is contained in:
Julio Cesar Laura Avendaño
2015-07-13 10:41:24 -04:00
9 changed files with 676 additions and 487 deletions

View File

@@ -169,6 +169,7 @@ class Dynaform extends BaseDynaform
$this->setProUid( $aData['PRO_UID'] ); $this->setProUid( $aData['PRO_UID'] );
$this->setDynType( isset( $aData['DYN_TYPE'] ) ? $aData['DYN_TYPE'] : 'xmlform' ); $this->setDynType( isset( $aData['DYN_TYPE'] ) ? $aData['DYN_TYPE'] : 'xmlform' );
$this->setDynFilename( $aData['PRO_UID'] . PATH_SEP . $dynUid ); $this->setDynFilename( $aData['PRO_UID'] . PATH_SEP . $dynUid );
$this->setDynUpdateDate( date("Y-m-d H:i:s"));
if (isset($aData["DYN_CONTENT"])) { if (isset($aData["DYN_CONTENT"])) {
$this->setDynContent($aData["DYN_CONTENT"]); $this->setDynContent($aData["DYN_CONTENT"]);
@@ -569,6 +570,7 @@ class Dynaform extends BaseDynaform
$oPro = DynaformPeer::retrieveByPK( $aData['DYN_UID'] ); $oPro = DynaformPeer::retrieveByPK( $aData['DYN_UID'] );
if (is_object( $oPro ) && get_class( $oPro ) == 'Dynaform') { if (is_object( $oPro ) && get_class( $oPro ) == 'Dynaform') {
$oPro->fromArray( $aData, BasePeer::TYPE_FIELDNAME ); $oPro->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
$oPro->setDynUpdateDate(date("Y-m-d H:i:s"));
if ($oPro->validate()) { if ($oPro->validate()) {
if (isset( $aData['DYN_TITLE'] )) { if (isset( $aData['DYN_TITLE'] )) {
$oPro->setDynTitle( $aData['DYN_TITLE'] ); $oPro->setDynTitle( $aData['DYN_TITLE'] );

View File

@@ -79,6 +79,8 @@ class DynaformMapBuilder
$tMap->addColumn('DYN_VERSION', 'DynVersion', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('DYN_VERSION', 'DynVersion', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('DYN_UPDATE_DATE', 'DynUpdateDate', 'int', CreoleTypes::DATE, false, null);
$tMap->addValidator('DYN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'xmlform|grid', 'Please select a valid dynaform type.'); $tMap->addValidator('DYN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'xmlform|grid', 'Please select a valid dynaform type.');
} // doBuild() } // doBuild()

View File

@@ -25,7 +25,7 @@ abstract class BaseAbeConfigurationPeer
const CLASS_DEFAULT = 'classes.model.AbeConfiguration'; const CLASS_DEFAULT = 'classes.model.AbeConfiguration';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 12; const NUM_COLUMNS = 13;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;

View File

@@ -4,6 +4,7 @@ require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php'; require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php'; include_once 'propel/util/Criteria.php';
include_once 'classes/model/AddonsManagerPeer.php'; include_once 'classes/model/AddonsManagerPeer.php';
@@ -22,133 +23,114 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
* The Peer class. * The Peer class.
* Instance provides a convenient way of calling static methods on a class * Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify. * that calling code may not be able to identify.
*
* @var AddonsManagerPeer * @var AddonsManagerPeer
*/ */
protected static $peer; protected static $peer;
/** /**
* The value for the addon_id field. * The value for the addon_id field.
*
* @var string * @var string
*/ */
protected $addon_id; protected $addon_id;
/** /**
* The value for the store_id field. * The value for the store_id field.
*
* @var string * @var string
*/ */
protected $store_id; protected $store_id;
/** /**
* The value for the addon_name field. * The value for the addon_name field.
*
* @var string * @var string
*/ */
protected $addon_name; protected $addon_name;
/** /**
* The value for the addon_nick field. * The value for the addon_nick field.
*
* @var string * @var string
*/ */
protected $addon_nick; protected $addon_nick;
/** /**
* The value for the addon_download_filename field. * The value for the addon_download_filename field.
*
* @var string * @var string
*/ */
protected $addon_download_filename; protected $addon_download_filename;
/** /**
* The value for the addon_description field. * The value for the addon_description field.
*
* @var string * @var string
*/ */
protected $addon_description; protected $addon_description;
/** /**
* The value for the addon_state field. * The value for the addon_state field.
*
* @var string * @var string
*/ */
protected $addon_state; protected $addon_state;
/** /**
* The value for the addon_state_changed field. * The value for the addon_state_changed field.
*
* @var int * @var int
*/ */
protected $addon_state_changed; protected $addon_state_changed;
/** /**
* The value for the addon_status field. * The value for the addon_status field.
*
* @var string * @var string
*/ */
protected $addon_status; protected $addon_status;
/** /**
* The value for the addon_version field. * The value for the addon_version field.
*
* @var string * @var string
*/ */
protected $addon_version; protected $addon_version;
/** /**
* The value for the addon_type field. * The value for the addon_type field.
*
* @var string * @var string
*/ */
protected $addon_type; protected $addon_type;
/** /**
* The value for the addon_publisher field. * The value for the addon_publisher field.
*
* @var string * @var string
*/ */
protected $addon_publisher; protected $addon_publisher;
/** /**
* The value for the addon_release_date field. * The value for the addon_release_date field.
*
* @var int * @var int
*/ */
protected $addon_release_date; protected $addon_release_date;
/** /**
* The value for the addon_release_type field. * The value for the addon_release_type field.
*
* @var string * @var string
*/ */
protected $addon_release_type; protected $addon_release_type;
/** /**
* The value for the addon_release_notes field. * The value for the addon_release_notes field.
*
* @var string * @var string
*/ */
protected $addon_release_notes; protected $addon_release_notes;
/** /**
* The value for the addon_download_url field. * The value for the addon_download_url field.
*
* @var string * @var string
*/ */
protected $addon_download_url; protected $addon_download_url;
/** /**
* The value for the addon_download_progress field. * The value for the addon_download_progress field.
*
* @var double * @var double
*/ */
protected $addon_download_progress; protected $addon_download_progress;
/** /**
* The value for the addon_download_md5 field. * The value for the addon_download_md5 field.
*
* @var string * @var string
*/ */
protected $addon_download_md5; protected $addon_download_md5;
@@ -156,7 +138,6 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
*
* @var boolean * @var boolean
*/ */
protected $alreadyInSave = false; protected $alreadyInSave = false;
@@ -164,7 +145,6 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
/** /**
* Flag to prevent endless validation loop, if this object is referenced * Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
*
* @var boolean * @var boolean
*/ */
protected $alreadyInValidation = false; protected $alreadyInValidation = false;
@@ -176,6 +156,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonId() public function getAddonId()
{ {
return $this->addon_id; return $this->addon_id;
} }
@@ -186,6 +167,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getStoreId() public function getStoreId()
{ {
return $this->store_id; return $this->store_id;
} }
@@ -196,6 +178,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonName() public function getAddonName()
{ {
return $this->addon_name; return $this->addon_name;
} }
@@ -206,6 +189,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonNick() public function getAddonNick()
{ {
return $this->addon_nick; return $this->addon_nick;
} }
@@ -216,6 +200,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonDownloadFilename() public function getAddonDownloadFilename()
{ {
return $this->addon_download_filename; return $this->addon_download_filename;
} }
@@ -226,6 +211,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonDescription() public function getAddonDescription()
{ {
return $this->addon_description; return $this->addon_description;
} }
@@ -236,6 +222,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonState() public function getAddonState()
{ {
return $this->addon_state; return $this->addon_state;
} }
@@ -249,14 +236,15 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonStateChanged($format = 'Y-m-d H:i:s') public function getAddonStateChanged($format = 'Y-m-d H:i:s')
{ {
if ($this->addon_state_changed === null || $this->addon_state_changed === '') { if ($this->addon_state_changed === null || $this->addon_state_changed === '') {
return null; return null;
} elseif (!is_int($this->addon_state_changed)) { } elseif (!is_int($this->addon_state_changed)) {
// a non-timestamp value was set externally, so we convert it // a non-timestamp value was set externally, so we convert it
$ts = strtotime($this->addon_state_changed); $ts = strtotime($this->addon_state_changed);
if ($ts === -1 || $ts === false) { if ($ts === -1 || $ts === false) {
// in PHP 5.1 return value changes to FALSE throw new PropelException("Unable to parse value of [addon_state_changed] as date/time value: " .
throw new PropelException( "Unable to parse value of [addon_state_changed] as date/time value: " . var_export( $this->addon_state_changed, true ) ); var_export($this->addon_state_changed, true));
} }
} else { } else {
$ts = $this->addon_state_changed; $ts = $this->addon_state_changed;
@@ -277,6 +265,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonStatus() public function getAddonStatus()
{ {
return $this->addon_status; return $this->addon_status;
} }
@@ -287,6 +276,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonVersion() public function getAddonVersion()
{ {
return $this->addon_version; return $this->addon_version;
} }
@@ -297,6 +287,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonType() public function getAddonType()
{ {
return $this->addon_type; return $this->addon_type;
} }
@@ -307,6 +298,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonPublisher() public function getAddonPublisher()
{ {
return $this->addon_publisher; return $this->addon_publisher;
} }
@@ -320,14 +312,15 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonReleaseDate($format = 'Y-m-d H:i:s') public function getAddonReleaseDate($format = 'Y-m-d H:i:s')
{ {
if ($this->addon_release_date === null || $this->addon_release_date === '') { if ($this->addon_release_date === null || $this->addon_release_date === '') {
return null; return null;
} elseif (!is_int($this->addon_release_date)) { } elseif (!is_int($this->addon_release_date)) {
// a non-timestamp value was set externally, so we convert it // a non-timestamp value was set externally, so we convert it
$ts = strtotime($this->addon_release_date); $ts = strtotime($this->addon_release_date);
if ($ts === -1 || $ts === false) { if ($ts === -1 || $ts === false) {
// in PHP 5.1 return value changes to FALSE throw new PropelException("Unable to parse value of [addon_release_date] as date/time value: " .
throw new PropelException( "Unable to parse value of [addon_release_date] as date/time value: " . var_export( $this->addon_release_date, true ) ); var_export($this->addon_release_date, true));
} }
} else { } else {
$ts = $this->addon_release_date; $ts = $this->addon_release_date;
@@ -348,6 +341,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonReleaseType() public function getAddonReleaseType()
{ {
return $this->addon_release_type; return $this->addon_release_type;
} }
@@ -358,6 +352,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonReleaseNotes() public function getAddonReleaseNotes()
{ {
return $this->addon_release_notes; return $this->addon_release_notes;
} }
@@ -368,6 +363,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonDownloadUrl() public function getAddonDownloadUrl()
{ {
return $this->addon_download_url; return $this->addon_download_url;
} }
@@ -378,6 +374,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonDownloadProgress() public function getAddonDownloadProgress()
{ {
return $this->addon_download_progress; return $this->addon_download_progress;
} }
@@ -388,6 +385,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function getAddonDownloadMd5() public function getAddonDownloadMd5()
{ {
return $this->addon_download_md5; return $this->addon_download_md5;
} }
@@ -399,15 +397,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonId($v) public function setAddonId($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_id !== $v) { if ($this->addon_id !== $v) {
$this->addon_id = $v; $this->addon_id = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_ID; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_ID;
} }
} // setAddonId() } // setAddonId()
/** /**
@@ -418,15 +419,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setStoreId($v) public function setStoreId($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->store_id !== $v) { if ($this->store_id !== $v) {
$this->store_id = $v; $this->store_id = $v;
$this->modifiedColumns[] = AddonsManagerPeer::STORE_ID; $this->modifiedColumns[] = AddonsManagerPeer::STORE_ID;
} }
} // setStoreId() } // setStoreId()
/** /**
@@ -437,15 +441,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonName($v) public function setAddonName($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_name !== $v) { if ($this->addon_name !== $v) {
$this->addon_name = $v; $this->addon_name = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_NAME; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NAME;
} }
} // setAddonName() } // setAddonName()
/** /**
@@ -456,11 +463,13 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonNick($v) public function setAddonNick($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_nick !== $v) { if ($this->addon_nick !== $v) {
$this->addon_nick = $v; $this->addon_nick = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_NICK; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NICK;
@@ -476,15 +485,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonDownloadFilename($v) public function setAddonDownloadFilename($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_download_filename !== $v) { if ($this->addon_download_filename !== $v) {
$this->addon_download_filename = $v; $this->addon_download_filename = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME;
} }
} // setAddonDownloadFilename() } // setAddonDownloadFilename()
/** /**
@@ -495,15 +507,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonDescription($v) public function setAddonDescription($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_description !== $v) { if ($this->addon_description !== $v) {
$this->addon_description = $v; $this->addon_description = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_DESCRIPTION; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DESCRIPTION;
} }
} // setAddonDescription() } // setAddonDescription()
/** /**
@@ -514,15 +529,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonState($v) public function setAddonState($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_state !== $v) { if ($this->addon_state !== $v) {
$this->addon_state = $v; $this->addon_state = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE;
} }
} // setAddonState() } // setAddonState()
/** /**
@@ -533,11 +551,16 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonStateChanged($v) public function setAddonStateChanged($v)
{ {
if ($v !== null && !is_int($v)) { if ($v !== null && !is_int($v)) {
$ts = strtotime($v); $ts = strtotime($v);
//Date/time accepts null values
if ($v == '') {
$ts = null;
}
if ($ts === -1 || $ts === false) { if ($ts === -1 || $ts === false) {
// in PHP 5.1 return value changes to FALSE throw new PropelException("Unable to parse date/time value for [addon_state_changed] from input: " .
throw new PropelException( "Unable to parse date/time value for [addon_state_changed] from input: " . var_export( $v, true ) ); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -546,6 +569,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$this->addon_state_changed = $ts; $this->addon_state_changed = $ts;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE_CHANGED; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE_CHANGED;
} }
} // setAddonStateChanged() } // setAddonStateChanged()
/** /**
@@ -556,15 +580,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonStatus($v) public function setAddonStatus($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_status !== $v) { if ($this->addon_status !== $v) {
$this->addon_status = $v; $this->addon_status = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATUS; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATUS;
} }
} // setAddonStatus() } // setAddonStatus()
/** /**
@@ -575,15 +602,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonVersion($v) public function setAddonVersion($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_version !== $v) { if ($this->addon_version !== $v) {
$this->addon_version = $v; $this->addon_version = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_VERSION; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_VERSION;
} }
} // setAddonVersion() } // setAddonVersion()
/** /**
@@ -594,15 +624,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonType($v) public function setAddonType($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_type !== $v) { if ($this->addon_type !== $v) {
$this->addon_type = $v; $this->addon_type = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_TYPE; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_TYPE;
} }
} // setAddonType() } // setAddonType()
/** /**
@@ -613,15 +646,18 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonPublisher($v) public function setAddonPublisher($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->addon_publisher !== $v) { if ($this->addon_publisher !== $v) {
$this->addon_publisher = $v; $this->addon_publisher = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_PUBLISHER; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_PUBLISHER;
} }
} // setAddonPublisher() } // setAddonPublisher()
/** /**
@@ -632,11 +668,16 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonReleaseDate($v) public function setAddonReleaseDate($v)
{ {
if ($v !== null && !is_int($v)) { if ($v !== null && !is_int($v)) {
$ts = strtotime($v); $ts = strtotime($v);
//Date/time accepts null values
if ($v == '') {
$ts = null;
}
if ($ts === -1 || $ts === false) { if ($ts === -1 || $ts === false) {
// in PHP 5.1 return value changes to FALSE throw new PropelException("Unable to parse date/time value for [addon_release_date] from input: " .
throw new PropelException( "Unable to parse date/time value for [addon_release_date] from input: " . var_export( $v, true ) ); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -645,6 +686,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$this->addon_release_date = $ts; $this->addon_release_date = $ts;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_DATE; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_DATE;
} }
} // setAddonReleaseDate() } // setAddonReleaseDate()
/** /**
@@ -655,6 +697,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonReleaseType($v) public function setAddonReleaseType($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
@@ -676,6 +719,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonReleaseNotes($v) public function setAddonReleaseNotes($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
@@ -697,6 +741,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonDownloadUrl($v) public function setAddonDownloadUrl($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
@@ -707,6 +752,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$this->addon_download_url = $v; $this->addon_download_url = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_URL; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_URL;
} }
} // setAddonDownloadUrl() } // setAddonDownloadUrl()
/** /**
@@ -717,10 +763,12 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonDownloadProgress($v) public function setAddonDownloadProgress($v)
{ {
if ($this->addon_download_progress !== $v) { if ($this->addon_download_progress !== $v) {
$this->addon_download_progress = $v; $this->addon_download_progress = $v;
$this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS;
} }
} // setAddonDownloadProgress() } // setAddonDownloadProgress()
/** /**
@@ -731,6 +779,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function setAddonDownloadMd5($v) public function setAddonDownloadMd5($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) { if ($v !== null && !is_string($v)) {
@@ -840,13 +889,12 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
} }
/** /**
* Stores the object in the database. * Stores the object in the database. If the object is new,
* If the object is new,
* it inserts it; otherwise an update is performed. This method * it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction. * wraps the doSave() worker method in a transaction.
* *
* @param Connection $con * @param Connection $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @return int The number of rows affected by this insert/update
* @throws PropelException * @throws PropelException
* @see doSave() * @see doSave()
*/ */
@@ -878,7 +926,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
* All related objects are also updated in this method. * All related objects are also updated in this method.
* *
* @param Connection $con * @param Connection $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @return int The number of rows affected by this insert/update and any referring
* @throws PropelException * @throws PropelException
* @see save() * @see save()
*/ */
@@ -888,6 +936,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
if (!$this->alreadyInSave) { if (!$this->alreadyInSave) {
$this->alreadyInSave = true; $this->alreadyInSave = true;
// If this object has been modified, then save it to the database. // If this object has been modified, then save it to the database.
if ($this->isModified()) { if ($this->isModified()) {
if ($this->isNew()) { if ($this->isNew()) {
@@ -895,6 +944,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically // should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows). // BasePeer::doInsert() can insert multiple rows).
$this->setNew(false); $this->setNew(false);
} else { } else {
$affectedRows += AddonsManagerPeer::doUpdate($this, $con); $affectedRows += AddonsManagerPeer::doUpdate($this, $con);
@@ -909,7 +959,6 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
/** /**
* Array of ValidationFailed objects. * Array of ValidationFailed objects.
*
* @var array ValidationFailed[] * @var array ValidationFailed[]
*/ */
protected $validationFailures = array(); protected $validationFailures = array();
@@ -957,7 +1006,8 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
* an aggreagated array of ValidationFailed objects will be returned. * an aggreagated array of ValidationFailed objects will be returned.
* *
* @param array $columns Array of column names to validate. * @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise. * @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/ */
protected function doValidate($columns = null) protected function doValidate($columns = null)
{ {
@@ -967,10 +1017,13 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$failureMap = array(); $failureMap = array();
if (($retval = AddonsManagerPeer::doValidate($this, $columns)) !== true) { if (($retval = AddonsManagerPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval); $failureMap = array_merge($failureMap, $retval);
} }
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
} }
@@ -1093,7 +1146,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$keys[14] => $this->getAddonReleaseNotes(), $keys[14] => $this->getAddonReleaseNotes(),
$keys[15] => $this->getAddonDownloadUrl(), $keys[15] => $this->getAddonDownloadUrl(),
$keys[16] => $this->getAddonDownloadProgress(), $keys[16] => $this->getAddonDownloadProgress(),
$keys[17] => $this->getAddonDownloadMd5() $keys[17] => $this->getAddonDownloadMd5(),
); );
return $result; return $result;
} }
@@ -1205,57 +1258,75 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) { if (array_key_exists($keys[0], $arr)) {
$this->setAddonId($arr[$keys[0]]); $this->setAddonId($arr[$keys[0]]);
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setStoreId($arr[$keys[1]]); $this->setStoreId($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) { if (array_key_exists($keys[2], $arr)) {
$this->setAddonName($arr[$keys[2]]); $this->setAddonName($arr[$keys[2]]);
} }
if (array_key_exists($keys[3], $arr)) { if (array_key_exists($keys[3], $arr)) {
$this->setAddonNick($arr[$keys[3]]); $this->setAddonNick($arr[$keys[3]]);
} }
if (array_key_exists($keys[4], $arr)) { if (array_key_exists($keys[4], $arr)) {
$this->setAddonDownloadFilename($arr[$keys[4]]); $this->setAddonDownloadFilename($arr[$keys[4]]);
} }
if (array_key_exists($keys[5], $arr)) { if (array_key_exists($keys[5], $arr)) {
$this->setAddonDescription($arr[$keys[5]]); $this->setAddonDescription($arr[$keys[5]]);
} }
if (array_key_exists($keys[6], $arr)) { if (array_key_exists($keys[6], $arr)) {
$this->setAddonState($arr[$keys[6]]); $this->setAddonState($arr[$keys[6]]);
} }
if (array_key_exists($keys[7], $arr)) { if (array_key_exists($keys[7], $arr)) {
$this->setAddonStateChanged($arr[$keys[7]]); $this->setAddonStateChanged($arr[$keys[7]]);
} }
if (array_key_exists($keys[8], $arr)) { if (array_key_exists($keys[8], $arr)) {
$this->setAddonStatus($arr[$keys[8]]); $this->setAddonStatus($arr[$keys[8]]);
} }
if (array_key_exists($keys[9], $arr)) { if (array_key_exists($keys[9], $arr)) {
$this->setAddonVersion($arr[$keys[9]]); $this->setAddonVersion($arr[$keys[9]]);
} }
if (array_key_exists($keys[10], $arr)) { if (array_key_exists($keys[10], $arr)) {
$this->setAddonType($arr[$keys[10]]); $this->setAddonType($arr[$keys[10]]);
} }
if (array_key_exists($keys[11], $arr)) { if (array_key_exists($keys[11], $arr)) {
$this->setAddonPublisher($arr[$keys[11]]); $this->setAddonPublisher($arr[$keys[11]]);
} }
if (array_key_exists($keys[12], $arr)) { if (array_key_exists($keys[12], $arr)) {
$this->setAddonReleaseDate($arr[$keys[12]]); $this->setAddonReleaseDate($arr[$keys[12]]);
} }
if (array_key_exists($keys[13], $arr)) { if (array_key_exists($keys[13], $arr)) {
$this->setAddonReleaseType($arr[$keys[13]]); $this->setAddonReleaseType($arr[$keys[13]]);
} }
if (array_key_exists($keys[14], $arr)) { if (array_key_exists($keys[14], $arr)) {
$this->setAddonReleaseNotes($arr[$keys[14]]); $this->setAddonReleaseNotes($arr[$keys[14]]);
} }
if (array_key_exists($keys[15], $arr)) { if (array_key_exists($keys[15], $arr)) {
$this->setAddonDownloadUrl($arr[$keys[15]]); $this->setAddonDownloadUrl($arr[$keys[15]]);
} }
if (array_key_exists($keys[16], $arr)) { if (array_key_exists($keys[16], $arr)) {
$this->setAddonDownloadProgress($arr[$keys[16]]); $this->setAddonDownloadProgress($arr[$keys[16]]);
} }
if (array_key_exists($keys[17], $arr)) { if (array_key_exists($keys[17], $arr)) {
$this->setAddonDownloadMd5($arr[$keys[17]]); $this->setAddonDownloadMd5($arr[$keys[17]]);
} }
} }
/** /**
@@ -1270,58 +1341,76 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
if ($this->isColumnModified(AddonsManagerPeer::ADDON_ID)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_ID)) {
$criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id); $criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id);
} }
if ($this->isColumnModified(AddonsManagerPeer::STORE_ID)) { if ($this->isColumnModified(AddonsManagerPeer::STORE_ID)) {
$criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id); $criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_NAME)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_NAME)) {
$criteria->add(AddonsManagerPeer::ADDON_NAME, $this->addon_name); $criteria->add(AddonsManagerPeer::ADDON_NAME, $this->addon_name);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_NICK)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_NICK)) {
$criteria->add(AddonsManagerPeer::ADDON_NICK, $this->addon_nick); $criteria->add(AddonsManagerPeer::ADDON_NICK, $this->addon_nick);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME)) {
$criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, $this->addon_download_filename); $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, $this->addon_download_filename);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_DESCRIPTION)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_DESCRIPTION)) {
$criteria->add(AddonsManagerPeer::ADDON_DESCRIPTION, $this->addon_description); $criteria->add(AddonsManagerPeer::ADDON_DESCRIPTION, $this->addon_description);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE)) {
$criteria->add(AddonsManagerPeer::ADDON_STATE, $this->addon_state); $criteria->add(AddonsManagerPeer::ADDON_STATE, $this->addon_state);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE_CHANGED)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE_CHANGED)) {
$criteria->add(AddonsManagerPeer::ADDON_STATE_CHANGED, $this->addon_state_changed); $criteria->add(AddonsManagerPeer::ADDON_STATE_CHANGED, $this->addon_state_changed);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATUS)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATUS)) {
$criteria->add(AddonsManagerPeer::ADDON_STATUS, $this->addon_status); $criteria->add(AddonsManagerPeer::ADDON_STATUS, $this->addon_status);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_VERSION)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_VERSION)) {
$criteria->add(AddonsManagerPeer::ADDON_VERSION, $this->addon_version); $criteria->add(AddonsManagerPeer::ADDON_VERSION, $this->addon_version);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_TYPE)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_TYPE)) {
$criteria->add(AddonsManagerPeer::ADDON_TYPE, $this->addon_type); $criteria->add(AddonsManagerPeer::ADDON_TYPE, $this->addon_type);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_PUBLISHER)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_PUBLISHER)) {
$criteria->add(AddonsManagerPeer::ADDON_PUBLISHER, $this->addon_publisher); $criteria->add(AddonsManagerPeer::ADDON_PUBLISHER, $this->addon_publisher);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_DATE)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_DATE)) {
$criteria->add(AddonsManagerPeer::ADDON_RELEASE_DATE, $this->addon_release_date); $criteria->add(AddonsManagerPeer::ADDON_RELEASE_DATE, $this->addon_release_date);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_TYPE)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_TYPE)) {
$criteria->add(AddonsManagerPeer::ADDON_RELEASE_TYPE, $this->addon_release_type); $criteria->add(AddonsManagerPeer::ADDON_RELEASE_TYPE, $this->addon_release_type);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_NOTES)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_NOTES)) {
$criteria->add(AddonsManagerPeer::ADDON_RELEASE_NOTES, $this->addon_release_notes); $criteria->add(AddonsManagerPeer::ADDON_RELEASE_NOTES, $this->addon_release_notes);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_URL)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_URL)) {
$criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_URL, $this->addon_download_url); $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_URL, $this->addon_download_url);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS)) {
$criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, $this->addon_download_progress); $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, $this->addon_download_progress);
} }
if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_MD5)) { if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_MD5)) {
$criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_MD5, $this->addon_download_md5); $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_MD5, $this->addon_download_md5);
} }
return $criteria; return $criteria;
} }
@@ -1346,7 +1435,6 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
/** /**
* Returns the composite primary key for this object. * Returns the composite primary key for this object.
* The array elements will be in same order as specified in XML. * The array elements will be in same order as specified in XML.
*
* @return array * @return array
*/ */
public function getPrimaryKey() public function getPrimaryKey()
@@ -1387,6 +1475,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
*/ */
public function copyInto($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setAddonName($this->addon_name); $copyObj->setAddonName($this->addon_name);
$copyObj->setAddonNick($this->addon_nick); $copyObj->setAddonNick($this->addon_nick);
@@ -1419,11 +1508,12 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent
$copyObj->setAddonDownloadMd5($this->addon_download_md5); $copyObj->setAddonDownloadMd5($this->addon_download_md5);
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setAddonId( null ); // this is a pkey column, so set to default value $copyObj->setAddonId(NULL); // this is a pkey column, so set to default value
$copyObj->setStoreId( null ); // this is a pkey column, so set to default value $copyObj->setStoreId(NULL); // this is a pkey column, so set to default value
} }

View File

@@ -69,6 +69,12 @@ abstract class BaseDynaform extends BaseObject implements Persistent
*/ */
protected $dyn_version; protected $dyn_version;
/**
* The value for the dyn_update_date field.
* @var int
*/
protected $dyn_update_date;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
@@ -160,6 +166,38 @@ abstract class BaseDynaform extends BaseObject implements Persistent
return $this->dyn_version; return $this->dyn_version;
} }
/**
* Get the [optionally formatted] [dyn_update_date] column value.
*
* @param string $format The date/time format string (either date()-style or strftime()-style).
* If format is NULL, then the integer unix timestamp will be returned.
* @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
* @throws PropelException - if unable to convert the date/time to timestamp.
*/
public function getDynUpdateDate($format = 'Y-m-d')
{
if ($this->dyn_update_date === null || $this->dyn_update_date === '') {
return null;
} elseif (!is_int($this->dyn_update_date)) {
// a non-timestamp value was set externally, so we convert it
$ts = strtotime($this->dyn_update_date);
if ($ts === -1 || $ts === false) {
throw new PropelException("Unable to parse value of [dyn_update_date] as date/time value: " .
var_export($this->dyn_update_date, true));
}
} else {
$ts = $this->dyn_update_date;
}
if ($format === null) {
return $ts;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $ts);
} else {
return date($format, $ts);
}
}
/** /**
* Set the value of [dyn_uid] column. * Set the value of [dyn_uid] column.
* *
@@ -314,6 +352,35 @@ abstract class BaseDynaform extends BaseObject implements Persistent
} // setDynVersion() } // setDynVersion()
/**
* Set the value of [dyn_update_date] column.
*
* @param int $v new value
* @return void
*/
public function setDynUpdateDate($v)
{
if ($v !== null && !is_int($v)) {
$ts = strtotime($v);
//Date/time accepts null values
if ($v == '') {
$ts = null;
}
if ($ts === -1 || $ts === false) {
throw new PropelException("Unable to parse date/time value for [dyn_update_date] from input: " .
var_export($v, true));
}
} else {
$ts = $v;
}
if ($this->dyn_update_date !== $ts) {
$this->dyn_update_date = $ts;
$this->modifiedColumns[] = DynaformPeer::DYN_UPDATE_DATE;
}
} // setDynUpdateDate()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -345,12 +412,14 @@ abstract class BaseDynaform extends BaseObject implements Persistent
$this->dyn_version = $rs->getInt($startcol + 6); $this->dyn_version = $rs->getInt($startcol + 6);
$this->dyn_update_date = $rs->getDate($startcol + 7, null);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 8; // 8 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating Dynaform object", $e); throw new PropelException("Error populating Dynaform object", $e);
@@ -575,6 +644,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
case 6: case 6:
return $this->getDynVersion(); return $this->getDynVersion();
break; break;
case 7:
return $this->getDynUpdateDate();
break;
default: default:
return null; return null;
break; break;
@@ -602,6 +674,7 @@ abstract class BaseDynaform extends BaseObject implements Persistent
$keys[4] => $this->getDynContent(), $keys[4] => $this->getDynContent(),
$keys[5] => $this->getDynLabel(), $keys[5] => $this->getDynLabel(),
$keys[6] => $this->getDynVersion(), $keys[6] => $this->getDynVersion(),
$keys[7] => $this->getDynUpdateDate(),
); );
return $result; return $result;
} }
@@ -654,6 +727,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
case 6: case 6:
$this->setDynVersion($value); $this->setDynVersion($value);
break; break;
case 7:
$this->setDynUpdateDate($value);
break;
} // switch() } // switch()
} }
@@ -705,6 +781,10 @@ abstract class BaseDynaform extends BaseObject implements Persistent
$this->setDynVersion($arr[$keys[6]]); $this->setDynVersion($arr[$keys[6]]);
} }
if (array_key_exists($keys[7], $arr)) {
$this->setDynUpdateDate($arr[$keys[7]]);
}
} }
/** /**
@@ -744,6 +824,10 @@ abstract class BaseDynaform extends BaseObject implements Persistent
$criteria->add(DynaformPeer::DYN_VERSION, $this->dyn_version); $criteria->add(DynaformPeer::DYN_VERSION, $this->dyn_version);
} }
if ($this->isColumnModified(DynaformPeer::DYN_UPDATE_DATE)) {
$criteria->add(DynaformPeer::DYN_UPDATE_DATE, $this->dyn_update_date);
}
return $criteria; return $criteria;
} }
@@ -810,6 +894,8 @@ abstract class BaseDynaform extends BaseObject implements Persistent
$copyObj->setDynVersion($this->dyn_version); $copyObj->setDynVersion($this->dyn_version);
$copyObj->setDynUpdateDate($this->dyn_update_date);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseDynaformPeer
const CLASS_DEFAULT = 'classes.model.Dynaform'; const CLASS_DEFAULT = 'classes.model.Dynaform';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 7; const NUM_COLUMNS = 8;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -52,6 +52,9 @@ abstract class BaseDynaformPeer
/** the column name for the DYN_VERSION field */ /** the column name for the DYN_VERSION field */
const DYN_VERSION = 'DYNAFORM.DYN_VERSION'; const DYN_VERSION = 'DYNAFORM.DYN_VERSION';
/** the column name for the DYN_UPDATE_DATE field */
const DYN_UPDATE_DATE = 'DYNAFORM.DYN_UPDATE_DATE';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -63,10 +66,10 @@ abstract class BaseDynaformPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', 'DynContent', 'DynLabel', 'DynVersion', ), BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', 'DynContent', 'DynLabel', 'DynVersion', 'DynUpdateDate', ),
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_COLNAME => array (DynaformPeer::DYN_UID, DynaformPeer::PRO_UID, DynaformPeer::DYN_TYPE, DynaformPeer::DYN_FILENAME, DynaformPeer::DYN_CONTENT, DynaformPeer::DYN_LABEL, DynaformPeer::DYN_VERSION, DynaformPeer::DYN_UPDATE_DATE, ),
BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', 'DYN_CONTENT', 'DYN_LABEL', 'DYN_VERSION', ), BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', 'DYN_CONTENT', 'DYN_LABEL', 'DYN_VERSION', 'DYN_UPDATE_DATE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@@ -76,10 +79,10 @@ abstract class BaseDynaformPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, 'DynContent' => 4, 'DynLabel' => 5, 'DynVersion' => 6, ), BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, 'DynContent' => 4, 'DynLabel' => 5, 'DynVersion' => 6, 'DynUpdateDate' => 7, ),
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_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, DynaformPeer::DYN_UPDATE_DATE => 7, ),
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_FIELDNAME => array ('DYN_UID' => 0, 'PRO_UID' => 1, 'DYN_TYPE' => 2, 'DYN_FILENAME' => 3, 'DYN_CONTENT' => 4, 'DYN_LABEL' => 5, 'DYN_VERSION' => 6, 'DYN_UPDATE_DATE' => 7, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@@ -194,6 +197,8 @@ abstract class BaseDynaformPeer
$criteria->addSelectColumn(DynaformPeer::DYN_VERSION); $criteria->addSelectColumn(DynaformPeer::DYN_VERSION);
$criteria->addSelectColumn(DynaformPeer::DYN_UPDATE_DATE);
} }
const COUNT = 'COUNT(DYNAFORM.DYN_UID)'; const COUNT = 'COUNT(DYNAFORM.DYN_UID)';

View File

@@ -465,6 +465,7 @@
<column name="DYN_CONTENT" type="LONGVARCHAR"/> <column name="DYN_CONTENT" type="LONGVARCHAR"/>
<column name="DYN_LABEL" type="LONGVARCHAR"/> <column name="DYN_LABEL" type="LONGVARCHAR"/>
<column name="DYN_VERSION" type="INTEGER" required="true"/> <column name="DYN_VERSION" type="INTEGER" required="true"/>
<column name="DYN_UPDATE_DATE" type="DATE" required="false"/>
<validator column="DYN_TYPE"> <validator column="DYN_TYPE">
<rule name="validValues" value="xmlform|grid" message="Please select a valid dynaform type."/> <rule name="validValues" value="xmlform|grid" message="Please select a valid dynaform type."/>
</validator> </validator>

View File

@@ -432,6 +432,7 @@ CREATE TABLE [DYNAFORM]
[PRO_UID] VARCHAR(32) default '0' NOT NULL, [PRO_UID] VARCHAR(32) default '0' NOT NULL,
[DYN_TYPE] VARCHAR(20) default 'xmlform' NOT NULL, [DYN_TYPE] VARCHAR(20) default 'xmlform' NOT NULL,
[DYN_FILENAME] VARCHAR(100) default '' NOT NULL, [DYN_FILENAME] VARCHAR(100) default '' NOT NULL,
[DYN_UPDATE_DATE] DATE default '' NOT NULL,
CONSTRAINT DYNAFORM_PK PRIMARY KEY ([DYN_UID]) CONSTRAINT DYNAFORM_PK PRIMARY KEY ([DYN_UID])
); );

View File

@@ -921,6 +921,7 @@ class DynaForm
$criteria->addSelectColumn(\DynaformPeer::DYN_TYPE); $criteria->addSelectColumn(\DynaformPeer::DYN_TYPE);
$criteria->addSelectColumn(\DynaformPeer::DYN_CONTENT); $criteria->addSelectColumn(\DynaformPeer::DYN_CONTENT);
$criteria->addSelectColumn(\DynaformPeer::DYN_VERSION); $criteria->addSelectColumn(\DynaformPeer::DYN_VERSION);
$criteria->addSelectColumn(\DynaformPeer::DYN_UPDATE_DATE);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME); $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME); $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
@@ -973,7 +974,8 @@ class DynaForm
$this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "", $this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "",
$this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "", $this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "",
$this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . "", $this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . "",
$this->getFieldNameByFormatFieldName("DYN_VERSION") => (int)($record["DYN_VERSION"]) $this->getFieldNameByFormatFieldName("DYN_VERSION") => (int)($record["DYN_VERSION"]),
$this->getFieldNameByFormatFieldName("DYN_UPDATE_DATE") => $record["DYN_UPDATE_DATE"]
); );
} catch (\Exception $e) { } catch (\Exception $e) {
throw $e; throw $e;