Adding the generated model classes for the actions by email

This commit is contained in:
Gustavo Cruz
2015-03-13 10:12:25 -04:00
parent c887019a59
commit 88def091e3
9 changed files with 328 additions and 343 deletions

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/map/MapBuilder.php'; require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php'; include_once 'creole/CreoleTypes.php';
@@ -17,6 +18,7 @@ include_once 'creole/CreoleTypes.php';
*/ */
class AbeConfigurationMapBuilder class AbeConfigurationMapBuilder
{ {
/** /**
* The (dot-path) name of this class * The (dot-path) name of this class
*/ */
@@ -86,8 +88,7 @@ class AbeConfigurationMapBuilder
$tMap->addColumn('ABE_CREATE_DATE', 'AbeCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null); $tMap->addColumn('ABE_CREATE_DATE', 'AbeCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null); $tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
} // doBuild() } // doBuild()
}
// AbeConfigurationMapBuilder
} // AbeConfigurationMapBuilder

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/map/MapBuilder.php'; require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php'; include_once 'creole/CreoleTypes.php';
@@ -17,6 +18,7 @@ include_once 'creole/CreoleTypes.php';
*/ */
class AbeRequestsMapBuilder class AbeRequestsMapBuilder
{ {
/** /**
* The (dot-path) name of this class * The (dot-path) name of this class
*/ */
@@ -82,8 +84,7 @@ class AbeRequestsMapBuilder
$tMap->addColumn('ABE_REQ_STATUS', 'AbeReqStatus', 'string', CreoleTypes::VARCHAR, false, 10); $tMap->addColumn('ABE_REQ_STATUS', 'AbeReqStatus', 'string', CreoleTypes::VARCHAR, false, 10);
$tMap->addColumn('ABE_REQ_ANSWERED', 'AbeReqAnswered', 'int', CreoleTypes::TINYINT, true, null); $tMap->addColumn('ABE_REQ_ANSWERED', 'AbeReqAnswered', 'int', CreoleTypes::TINYINT, true, null);
} // doBuild() } // doBuild()
}
// AbeRequestsMapBuilder
} // AbeRequestsMapBuilder

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/map/MapBuilder.php'; require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php'; include_once 'creole/CreoleTypes.php';
@@ -17,6 +18,7 @@ include_once 'creole/CreoleTypes.php';
*/ */
class AbeResponsesMapBuilder class AbeResponsesMapBuilder
{ {
/** /**
* The (dot-path) name of this class * The (dot-path) name of this class
*/ */
@@ -76,8 +78,7 @@ class AbeResponsesMapBuilder
$tMap->addColumn('ABE_RES_STATUS', 'AbeResStatus', 'string', CreoleTypes::VARCHAR, true, 10); $tMap->addColumn('ABE_RES_STATUS', 'AbeResStatus', 'string', CreoleTypes::VARCHAR, true, 10);
$tMap->addColumn('ABE_RES_MESSAGE', 'AbeResMessage', 'string', CreoleTypes::VARCHAR, false, 255); $tMap->addColumn('ABE_RES_MESSAGE', 'AbeResMessage', 'string', CreoleTypes::VARCHAR, false, 255);
} // doBuild() } // doBuild()
}
// AbeResponsesMapBuilder
} // AbeResponsesMapBuilder

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/om/BaseObject.php'; require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php'; require_once 'propel/om/Persistent.php';
@@ -17,6 +18,7 @@ include_once 'classes/model/AbeConfigurationPeer.php';
*/ */
abstract class BaseAbeConfiguration extends BaseObject implements Persistent abstract class BaseAbeConfiguration 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
@@ -25,84 +27,72 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
*/ */
protected static $peer; protected static $peer;
/** /**
* The value for the abe_uid field. * The value for the abe_uid field.
* @var string * @var string
*/ */
protected $abe_uid = ''; protected $abe_uid = '';
/** /**
* The value for the pro_uid field. * The value for the pro_uid field.
* @var string * @var string
*/ */
protected $pro_uid = ''; protected $pro_uid = '';
/** /**
* The value for the tas_uid field. * The value for the tas_uid field.
* @var string * @var string
*/ */
protected $tas_uid = ''; protected $tas_uid = '';
/** /**
* The value for the abe_type field. * The value for the abe_type field.
* @var string * @var string
*/ */
protected $abe_type = ''; protected $abe_type = '';
/** /**
* The value for the abe_template field. * The value for the abe_template field.
* @var string * @var string
*/ */
protected $abe_template = ''; protected $abe_template = '';
/** /**
* The value for the abe_dyn_type field. * The value for the abe_dyn_type field.
* @var string * @var string
*/ */
protected $abe_dyn_type = 'NORMAL'; protected $abe_dyn_type = 'NORMAL';
/** /**
* The value for the dyn_uid field. * The value for the dyn_uid field.
* @var string * @var string
*/ */
protected $dyn_uid = ''; protected $dyn_uid = '';
/** /**
* The value for the abe_email_field field. * The value for the abe_email_field field.
* @var string * @var string
*/ */
protected $abe_email_field = ''; protected $abe_email_field = '';
/** /**
* The value for the abe_action_field field. * The value for the abe_action_field field.
* @var string * @var string
*/ */
protected $abe_action_field = ''; protected $abe_action_field = '';
/** /**
* The value for the abe_case_note_in_response field. * The value for the abe_case_note_in_response field.
* @var int * @var int
*/ */
protected $abe_case_note_in_response = 0; protected $abe_case_note_in_response = 0;
/** /**
* The value for the abe_create_date field. * The value for the abe_create_date field.
* @var int * @var int
*/ */
protected $abe_create_date; protected $abe_create_date;
/** /**
* The value for the abe_update_date field. * The value for the abe_update_date field.
* @var int * @var int
@@ -130,6 +120,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
*/ */
public function getAbeUid() public function getAbeUid()
{ {
return $this->abe_uid; return $this->abe_uid;
} }
@@ -249,8 +240,8 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
// 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->abe_create_date); $ts = strtotime($this->abe_create_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 [abe_create_date] as date/time value: " .
throw new PropelException("Unable to parse value of [abe_create_date] as date/time value: " . var_export($this->abe_create_date, true)); var_export($this->abe_create_date, true));
} }
} else { } else {
$ts = $this->abe_create_date; $ts = $this->abe_create_date;
@@ -281,8 +272,8 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
// 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->abe_update_date); $ts = strtotime($this->abe_update_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 [abe_update_date] as date/time value: " .
throw new PropelException("Unable to parse value of [abe_update_date] as date/time value: " . var_export($this->abe_update_date, true)); var_export($this->abe_update_date, true));
} }
} else { } else {
$ts = $this->abe_update_date; $ts = $this->abe_update_date;
@@ -316,8 +307,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_UID; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_UID;
} }
} } // setAbeUid()
// setAbeUid()
/** /**
* Set the value of [pro_uid] column. * Set the value of [pro_uid] column.
@@ -339,8 +329,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::PRO_UID; $this->modifiedColumns[] = AbeConfigurationPeer::PRO_UID;
} }
} } // setProUid()
// setProUid()
/** /**
* Set the value of [tas_uid] column. * Set the value of [tas_uid] column.
@@ -362,8 +351,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::TAS_UID; $this->modifiedColumns[] = AbeConfigurationPeer::TAS_UID;
} }
} } // setTasUid()
// setTasUid()
/** /**
* Set the value of [abe_type] column. * Set the value of [abe_type] column.
@@ -385,8 +373,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_TYPE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_TYPE;
} }
} } // setAbeType()
// setAbeType()
/** /**
* Set the value of [abe_template] column. * Set the value of [abe_template] column.
@@ -408,8 +395,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_TEMPLATE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_TEMPLATE;
} }
} } // setAbeTemplate()
// setAbeTemplate()
/** /**
* Set the value of [abe_dyn_type] column. * Set the value of [abe_dyn_type] column.
@@ -431,8 +417,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_DYN_TYPE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_DYN_TYPE;
} }
} } // setAbeDynType()
// setAbeDynType()
/** /**
* Set the value of [dyn_uid] column. * Set the value of [dyn_uid] column.
@@ -454,8 +439,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::DYN_UID; $this->modifiedColumns[] = AbeConfigurationPeer::DYN_UID;
} }
} } // setDynUid()
// setDynUid()
/** /**
* Set the value of [abe_email_field] column. * Set the value of [abe_email_field] column.
@@ -477,8 +461,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_EMAIL_FIELD; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_EMAIL_FIELD;
} }
} } // setAbeEmailField()
// setAbeEmailField()
/** /**
* Set the value of [abe_action_field] column. * Set the value of [abe_action_field] column.
@@ -500,8 +483,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_ACTION_FIELD; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_ACTION_FIELD;
} }
} } // setAbeActionField()
// setAbeActionField()
/** /**
* Set the value of [abe_case_note_in_response] column. * Set the value of [abe_case_note_in_response] column.
@@ -523,8 +505,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE;
} }
} } // setAbeCaseNoteInResponse()
// setAbeCaseNoteInResponse()
/** /**
* Set the value of [abe_create_date] column. * Set the value of [abe_create_date] column.
@@ -537,9 +518,13 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
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 [abe_create_date] from input: " .
throw new PropelException("Unable to parse date/time value for [abe_create_date] from input: " . var_export($v, true)); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -549,8 +534,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_CREATE_DATE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_CREATE_DATE;
} }
} } // setAbeCreateDate()
// setAbeCreateDate()
/** /**
* Set the value of [abe_update_date] column. * Set the value of [abe_update_date] column.
@@ -563,9 +547,13 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
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 [abe_update_date] from input: " .
throw new PropelException("Unable to parse date/time value for [abe_update_date] from input: " . var_export($v, true)); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -575,8 +563,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_UPDATE_DATE; $this->modifiedColumns[] = AbeConfigurationPeer::ABE_UPDATE_DATE;
} }
} } // setAbeUpdateDate()
// setAbeUpdateDate()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
@@ -667,7 +654,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
* 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()
*/ */
@@ -699,7 +686,7 @@ abstract class BaseAbeConfiguration 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()
*/ */
@@ -728,8 +715,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->alreadyInSave = false; $this->alreadyInSave = false;
} }
return $affectedRows; return $affectedRows;
} } // doSave()
// doSave()
/** /**
* Array of ValidationFailed objects. * Array of ValidationFailed objects.
@@ -780,7 +766,8 @@ abstract class BaseAbeConfiguration 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)
{ {
@@ -867,8 +854,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
default: default:
return null; return null;
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -964,8 +950,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
case 11: case 11:
$this->setAbeUpdateDate($value); $this->setAbeUpdateDate($value);
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -991,39 +976,51 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) { if (array_key_exists($keys[0], $arr)) {
$this->setAbeUid($arr[$keys[0]]); $this->setAbeUid($arr[$keys[0]]);
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setProUid($arr[$keys[1]]); $this->setProUid($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) { if (array_key_exists($keys[2], $arr)) {
$this->setTasUid($arr[$keys[2]]); $this->setTasUid($arr[$keys[2]]);
} }
if (array_key_exists($keys[3], $arr)) { if (array_key_exists($keys[3], $arr)) {
$this->setAbeType($arr[$keys[3]]); $this->setAbeType($arr[$keys[3]]);
} }
if (array_key_exists($keys[4], $arr)) { if (array_key_exists($keys[4], $arr)) {
$this->setAbeTemplate($arr[$keys[4]]); $this->setAbeTemplate($arr[$keys[4]]);
} }
if (array_key_exists($keys[5], $arr)) { if (array_key_exists($keys[5], $arr)) {
$this->setAbeDynType($arr[$keys[5]]); $this->setAbeDynType($arr[$keys[5]]);
} }
if (array_key_exists($keys[6], $arr)) { if (array_key_exists($keys[6], $arr)) {
$this->setDynUid($arr[$keys[6]]); $this->setDynUid($arr[$keys[6]]);
} }
if (array_key_exists($keys[7], $arr)) { if (array_key_exists($keys[7], $arr)) {
$this->setAbeEmailField($arr[$keys[7]]); $this->setAbeEmailField($arr[$keys[7]]);
} }
if (array_key_exists($keys[8], $arr)) { if (array_key_exists($keys[8], $arr)) {
$this->setAbeActionField($arr[$keys[8]]); $this->setAbeActionField($arr[$keys[8]]);
} }
if (array_key_exists($keys[9], $arr)) { if (array_key_exists($keys[9], $arr)) {
$this->setAbeCaseNoteInResponse($arr[$keys[9]]); $this->setAbeCaseNoteInResponse($arr[$keys[9]]);
} }
if (array_key_exists($keys[10], $arr)) { if (array_key_exists($keys[10], $arr)) {
$this->setAbeCreateDate($arr[$keys[10]]); $this->setAbeCreateDate($arr[$keys[10]]);
} }
if (array_key_exists($keys[11], $arr)) { if (array_key_exists($keys[11], $arr)) {
$this->setAbeUpdateDate($arr[$keys[11]]); $this->setAbeUpdateDate($arr[$keys[11]]);
} }
} }
/** /**
@@ -1038,40 +1035,52 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
if ($this->isColumnModified(AbeConfigurationPeer::ABE_UID)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_UID)) {
$criteria->add(AbeConfigurationPeer::ABE_UID, $this->abe_uid); $criteria->add(AbeConfigurationPeer::ABE_UID, $this->abe_uid);
} }
if ($this->isColumnModified(AbeConfigurationPeer::PRO_UID)) { if ($this->isColumnModified(AbeConfigurationPeer::PRO_UID)) {
$criteria->add(AbeConfigurationPeer::PRO_UID, $this->pro_uid); $criteria->add(AbeConfigurationPeer::PRO_UID, $this->pro_uid);
} }
if ($this->isColumnModified(AbeConfigurationPeer::TAS_UID)) { if ($this->isColumnModified(AbeConfigurationPeer::TAS_UID)) {
$criteria->add(AbeConfigurationPeer::TAS_UID, $this->tas_uid); $criteria->add(AbeConfigurationPeer::TAS_UID, $this->tas_uid);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_TYPE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_TYPE)) {
$criteria->add(AbeConfigurationPeer::ABE_TYPE, $this->abe_type); $criteria->add(AbeConfigurationPeer::ABE_TYPE, $this->abe_type);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_TEMPLATE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_TEMPLATE)) {
$criteria->add(AbeConfigurationPeer::ABE_TEMPLATE, $this->abe_template); $criteria->add(AbeConfigurationPeer::ABE_TEMPLATE, $this->abe_template);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_DYN_TYPE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_DYN_TYPE)) {
$criteria->add(AbeConfigurationPeer::ABE_DYN_TYPE, $this->abe_dyn_type); $criteria->add(AbeConfigurationPeer::ABE_DYN_TYPE, $this->abe_dyn_type);
} }
if ($this->isColumnModified(AbeConfigurationPeer::DYN_UID)) { if ($this->isColumnModified(AbeConfigurationPeer::DYN_UID)) {
$criteria->add(AbeConfigurationPeer::DYN_UID, $this->dyn_uid); $criteria->add(AbeConfigurationPeer::DYN_UID, $this->dyn_uid);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_EMAIL_FIELD)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_EMAIL_FIELD)) {
$criteria->add(AbeConfigurationPeer::ABE_EMAIL_FIELD, $this->abe_email_field); $criteria->add(AbeConfigurationPeer::ABE_EMAIL_FIELD, $this->abe_email_field);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_ACTION_FIELD)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_ACTION_FIELD)) {
$criteria->add(AbeConfigurationPeer::ABE_ACTION_FIELD, $this->abe_action_field); $criteria->add(AbeConfigurationPeer::ABE_ACTION_FIELD, $this->abe_action_field);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE)) {
$criteria->add(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, $this->abe_case_note_in_response); $criteria->add(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, $this->abe_case_note_in_response);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_CREATE_DATE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_CREATE_DATE)) {
$criteria->add(AbeConfigurationPeer::ABE_CREATE_DATE, $this->abe_create_date); $criteria->add(AbeConfigurationPeer::ABE_CREATE_DATE, $this->abe_create_date);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_UPDATE_DATE)) { if ($this->isColumnModified(AbeConfigurationPeer::ABE_UPDATE_DATE)) {
$criteria->add(AbeConfigurationPeer::ABE_UPDATE_DATE, $this->abe_update_date); $criteria->add(AbeConfigurationPeer::ABE_UPDATE_DATE, $this->abe_update_date);
} }
return $criteria; return $criteria;
} }
@@ -1192,5 +1201,4 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
return self::$peer; return self::$peer;
} }
} }
// BaseAbeConfiguration

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/util/BasePeer.php'; require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class. // The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by AbeConfigurationPeer::getOMClass() // actual class may be a subclass -- as returned by AbeConfigurationPeer::getOMClass()
@@ -13,6 +14,7 @@ include_once 'classes/model/AbeConfiguration.php';
*/ */
abstract class BaseAbeConfigurationPeer abstract class BaseAbeConfigurationPeer
{ {
/** the default database name for this class */ /** the default database name for this class */
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
@@ -68,6 +70,7 @@ abstract class BaseAbeConfigurationPeer
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
/** /**
* holds an array of fieldnames * holds an array of fieldnames
* *
@@ -118,17 +121,13 @@ abstract class BaseAbeConfigurationPeer
$map = AbeConfigurationPeer::getTableMap(); $map = AbeConfigurationPeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array(); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
self::$phpNameMap = $nameMap; self::$phpNameMap = $nameMap;
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
* Translates a fieldname to another type * Translates a fieldname to another type
* *
@@ -142,11 +141,9 @@ abstract class BaseAbeConfigurationPeer
{ {
$toNames = self::getFieldNames($toType); $toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
return $toNames[$key]; return $toNames[$key];
} }
@@ -164,7 +161,6 @@ abstract class BaseAbeConfigurationPeer
if (!array_key_exists($type, self::$fieldNames)) { if (!array_key_exists($type, self::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
} }
return self::$fieldNames[$type]; return self::$fieldNames[$type];
} }
@@ -198,6 +194,7 @@ abstract class BaseAbeConfigurationPeer
*/ */
public static function addSelectColumns(Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UID); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_UID);
$criteria->addSelectColumn(AbeConfigurationPeer::PRO_UID); $criteria->addSelectColumn(AbeConfigurationPeer::PRO_UID);
@@ -221,6 +218,7 @@ abstract class BaseAbeConfigurationPeer
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_CREATE_DATE); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_CREATE_DATE);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UPDATE_DATE); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_UPDATE_DATE);
} }
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)'; const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';
@@ -241,7 +239,6 @@ abstract class BaseAbeConfigurationPeer
// clear out anything that might confuse the ORDER BY clause // clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns(); $criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(AbeConfigurationPeer::COUNT_DISTINCT); $criteria->addSelectColumn(AbeConfigurationPeer::COUNT_DISTINCT);
} else { } else {
@@ -254,7 +251,6 @@ abstract class BaseAbeConfigurationPeer
} }
$rs = AbeConfigurationPeer::doSelectRS($criteria, $con); $rs = AbeConfigurationPeer::doSelectRS($criteria, $con);
if ($rs->next()) { if ($rs->next()) {
return $rs->getInt(1); return $rs->getInt(1);
} else { } else {
@@ -262,7 +258,6 @@ abstract class BaseAbeConfigurationPeer
return 0; return 0;
} }
} }
/** /**
* Method to select one object from the DB. * Method to select one object from the DB.
* *
@@ -277,11 +272,9 @@ abstract class BaseAbeConfigurationPeer
$critcopy = clone $criteria; $critcopy = clone $criteria;
$critcopy->setLimit(1); $critcopy->setLimit(1);
$objects = AbeConfigurationPeer::doSelect($critcopy, $con); $objects = AbeConfigurationPeer::doSelect($critcopy, $con);
if ($objects) { if ($objects) {
return $objects[0]; return $objects[0];
} }
return null; return null;
} }
/** /**
@@ -351,7 +344,6 @@ abstract class BaseAbeConfigurationPeer
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
@@ -422,8 +414,8 @@ abstract class BaseAbeConfigurationPeer
/** /**
* Method perform an UPDATE on the database, given a AbeConfiguration or Criteria object. * Method perform an UPDATE on the database, given a AbeConfiguration or Criteria object.
* *
* @param mixed $values Criteria or AbeConfiguration object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or AbeConfiguration object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -443,7 +435,6 @@ abstract class BaseAbeConfigurationPeer
$selectCriteria->add(AbeConfigurationPeer::ABE_UID, $criteria->remove(AbeConfigurationPeer::ABE_UID), $comparison); $selectCriteria->add(AbeConfigurationPeer::ABE_UID, $criteria->remove(AbeConfigurationPeer::ABE_UID), $comparison);
} else { } else {
// $values is AbeConfiguration object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
@@ -464,9 +455,7 @@ abstract class BaseAbeConfigurationPeer
if ($con === null) { if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
@@ -486,7 +475,8 @@ abstract class BaseAbeConfigurationPeer
* @param mixed $values Criteria or AbeConfiguration object or primary key or array of primary keys * @param mixed $values Criteria or AbeConfiguration object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel. * if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -500,6 +490,7 @@ abstract class BaseAbeConfigurationPeer
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
} elseif ($values instanceof AbeConfiguration) { } elseif ($values instanceof AbeConfiguration) {
$criteria = $values->buildPkeyCriteria(); $criteria = $values->buildPkeyCriteria();
} else { } else {
// it must be the primary key // it must be the primary key
@@ -519,7 +510,6 @@ abstract class BaseAbeConfigurationPeer
$affectedRows += BasePeer::doDelete($criteria, $con); $affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
$con->rollback(); $con->rollback();
@@ -558,6 +548,7 @@ abstract class BaseAbeConfigurationPeer
} }
} }
} else { } else {
} }
return BasePeer::doValidate(AbeConfigurationPeer::DATABASE_NAME, AbeConfigurationPeer::TABLE_NAME, $columns); return BasePeer::doValidate(AbeConfigurationPeer::DATABASE_NAME, AbeConfigurationPeer::TABLE_NAME, $columns);
@@ -612,7 +603,6 @@ abstract class BaseAbeConfigurationPeer
} }
} }
// BaseAbeConfigurationPeer
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/om/BaseObject.php'; require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php'; require_once 'propel/om/Persistent.php';
@@ -17,6 +18,7 @@ include_once 'classes/model/AbeRequestsPeer.php';
*/ */
abstract class BaseAbeRequests extends BaseObject implements Persistent abstract class BaseAbeRequests 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
@@ -25,55 +27,47 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
*/ */
protected static $peer; protected static $peer;
/** /**
* The value for the abe_req_uid field. * The value for the abe_req_uid field.
* @var string * @var string
*/ */
protected $abe_req_uid = ''; protected $abe_req_uid = '';
/** /**
* The value for the abe_uid field. * The value for the abe_uid field.
* @var string * @var string
*/ */
protected $abe_uid = ''; protected $abe_uid = '';
/** /**
* The value for the app_uid field. * The value for the app_uid field.
* @var string * @var string
*/ */
protected $app_uid = ''; protected $app_uid = '';
/** /**
* The value for the del_index field. * The value for the del_index field.
* @var int * @var int
*/ */
protected $del_index = 0; protected $del_index = 0;
/** /**
* The value for the abe_req_sent_to field. * The value for the abe_req_sent_to field.
* @var string * @var string
*/ */
protected $abe_req_sent_to = ''; protected $abe_req_sent_to = '';
/** /**
* The value for the abe_req_subject field. * The value for the abe_req_subject field.
* @var string * @var string
*/ */
protected $abe_req_subject = ''; protected $abe_req_subject = '';
/** /**
* The value for the abe_req_body field. * The value for the abe_req_body field.
* @var string * @var string
*/ */
protected $abe_req_body = ''; protected $abe_req_body;
/** /**
* The value for the abe_req_date field. * The value for the abe_req_date field.
@@ -81,14 +75,12 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
*/ */
protected $abe_req_date; protected $abe_req_date;
/** /**
* The value for the abe_req_status field. * The value for the abe_req_status field.
* @var string * @var string
*/ */
protected $abe_req_status = ''; protected $abe_req_status = '';
/** /**
* The value for the abe_req_answered field. * The value for the abe_req_answered field.
* @var int * @var int
@@ -203,8 +195,8 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
// 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->abe_req_date); $ts = strtotime($this->abe_req_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 [abe_req_date] as date/time value: " .
throw new PropelException("Unable to parse value of [abe_req_date] as date/time value: " . var_export($this->abe_req_date, true)); var_export($this->abe_req_date, true));
} }
} else { } else {
$ts = $this->abe_req_date; $ts = $this->abe_req_date;
@@ -260,8 +252,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_UID; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_UID;
} }
} } // setAbeReqUid()
// setAbeReqUid()
/** /**
* Set the value of [abe_uid] column. * Set the value of [abe_uid] column.
@@ -283,8 +274,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_UID; $this->modifiedColumns[] = AbeRequestsPeer::ABE_UID;
} }
} } // setAbeUid()
// setAbeUid()
/** /**
* Set the value of [app_uid] column. * Set the value of [app_uid] column.
@@ -306,8 +296,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::APP_UID; $this->modifiedColumns[] = AbeRequestsPeer::APP_UID;
} }
} } // setAppUid()
// setAppUid()
/** /**
* Set the value of [del_index] column. * Set the value of [del_index] column.
@@ -329,8 +318,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::DEL_INDEX; $this->modifiedColumns[] = AbeRequestsPeer::DEL_INDEX;
} }
} } // setDelIndex()
// setDelIndex()
/** /**
* Set the value of [abe_req_sent_to] column. * Set the value of [abe_req_sent_to] column.
@@ -352,8 +340,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_SENT_TO; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_SENT_TO;
} }
} } // setAbeReqSentTo()
// setAbeReqSentTo()
/** /**
* Set the value of [abe_req_subject] column. * Set the value of [abe_req_subject] column.
@@ -375,8 +362,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_SUBJECT; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_SUBJECT;
} }
} } // setAbeReqSubject()
// setAbeReqSubject()
/** /**
* Set the value of [abe_req_body] column. * Set the value of [abe_req_body] column.
@@ -393,13 +379,12 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->abe_req_body !== $v || $v === '') { if ($this->abe_req_body !== $v) {
$this->abe_req_body = $v; $this->abe_req_body = $v;
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_BODY; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_BODY;
} }
} } // setAbeReqBody()
// setAbeReqBody()
/** /**
* Set the value of [abe_req_date] column. * Set the value of [abe_req_date] column.
@@ -412,9 +397,13 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
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 [abe_req_date] from input: " .
throw new PropelException("Unable to parse date/time value for [abe_req_date] from input: " . var_export($v, true)); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -424,8 +413,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_DATE; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_DATE;
} }
} } // setAbeReqDate()
// setAbeReqDate()
/** /**
* Set the value of [abe_req_status] column. * Set the value of [abe_req_status] column.
@@ -447,8 +435,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_STATUS; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_STATUS;
} }
} } // setAbeReqStatus()
// setAbeReqStatus()
/** /**
* Set the value of [abe_req_answered] column. * Set the value of [abe_req_answered] column.
@@ -470,8 +457,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_ANSWERED; $this->modifiedColumns[] = AbeRequestsPeer::ABE_REQ_ANSWERED;
} }
} } // setAbeReqAnswered()
// setAbeReqAnswered()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
@@ -558,7 +544,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
* 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()
*/ */
@@ -590,14 +576,13 @@ abstract class BaseAbeRequests 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()
*/ */
protected function doSave($con) protected function doSave($con)
{ {
$affectedRows = 0; $affectedRows = 0; // initialize var to track total num of affected rows
// initialize var to track total num of affected rows
if (!$this->alreadyInSave) { if (!$this->alreadyInSave) {
$this->alreadyInSave = true; $this->alreadyInSave = true;
@@ -614,15 +599,13 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
} else { } else {
$affectedRows += AbeRequestsPeer::doUpdate($this, $con); $affectedRows += AbeRequestsPeer::doUpdate($this, $con);
} }
$this->resetModified(); $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
// [HL] After being saved an object is no longer 'modified'
} }
$this->alreadyInSave = false; $this->alreadyInSave = false;
} }
return $affectedRows; return $affectedRows;
} } // doSave()
// doSave()
/** /**
* Array of ValidationFailed objects. * Array of ValidationFailed objects.
@@ -673,7 +656,8 @@ abstract class BaseAbeRequests 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)
{ {
@@ -754,8 +738,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
default: default:
return null; return null;
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -843,8 +826,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
case 9: case 9:
$this->setAbeReqAnswered($value); $this->setAbeReqAnswered($value);
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -870,33 +852,43 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) { if (array_key_exists($keys[0], $arr)) {
$this->setAbeReqUid($arr[$keys[0]]); $this->setAbeReqUid($arr[$keys[0]]);
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setAbeUid($arr[$keys[1]]); $this->setAbeUid($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) { if (array_key_exists($keys[2], $arr)) {
$this->setAppUid($arr[$keys[2]]); $this->setAppUid($arr[$keys[2]]);
} }
if (array_key_exists($keys[3], $arr)) { if (array_key_exists($keys[3], $arr)) {
$this->setDelIndex($arr[$keys[3]]); $this->setDelIndex($arr[$keys[3]]);
} }
if (array_key_exists($keys[4], $arr)) { if (array_key_exists($keys[4], $arr)) {
$this->setAbeReqSentTo($arr[$keys[4]]); $this->setAbeReqSentTo($arr[$keys[4]]);
} }
if (array_key_exists($keys[5], $arr)) { if (array_key_exists($keys[5], $arr)) {
$this->setAbeReqSubject($arr[$keys[5]]); $this->setAbeReqSubject($arr[$keys[5]]);
} }
if (array_key_exists($keys[6], $arr)) { if (array_key_exists($keys[6], $arr)) {
$this->setAbeReqBody($arr[$keys[6]]); $this->setAbeReqBody($arr[$keys[6]]);
} }
if (array_key_exists($keys[7], $arr)) { if (array_key_exists($keys[7], $arr)) {
$this->setAbeReqDate($arr[$keys[7]]); $this->setAbeReqDate($arr[$keys[7]]);
} }
if (array_key_exists($keys[8], $arr)) { if (array_key_exists($keys[8], $arr)) {
$this->setAbeReqStatus($arr[$keys[8]]); $this->setAbeReqStatus($arr[$keys[8]]);
} }
if (array_key_exists($keys[9], $arr)) { if (array_key_exists($keys[9], $arr)) {
$this->setAbeReqAnswered($arr[$keys[9]]); $this->setAbeReqAnswered($arr[$keys[9]]);
} }
} }
/** /**
@@ -911,34 +903,44 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_UID)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_UID)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_UID, $this->abe_req_uid); $criteria->add(AbeRequestsPeer::ABE_REQ_UID, $this->abe_req_uid);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_UID)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_UID)) {
$criteria->add(AbeRequestsPeer::ABE_UID, $this->abe_uid); $criteria->add(AbeRequestsPeer::ABE_UID, $this->abe_uid);
} }
if ($this->isColumnModified(AbeRequestsPeer::APP_UID)) { if ($this->isColumnModified(AbeRequestsPeer::APP_UID)) {
$criteria->add(AbeRequestsPeer::APP_UID, $this->app_uid); $criteria->add(AbeRequestsPeer::APP_UID, $this->app_uid);
} }
if ($this->isColumnModified(AbeRequestsPeer::DEL_INDEX)) { if ($this->isColumnModified(AbeRequestsPeer::DEL_INDEX)) {
$criteria->add(AbeRequestsPeer::DEL_INDEX, $this->del_index); $criteria->add(AbeRequestsPeer::DEL_INDEX, $this->del_index);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_SENT_TO)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_SENT_TO)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_SENT_TO, $this->abe_req_sent_to); $criteria->add(AbeRequestsPeer::ABE_REQ_SENT_TO, $this->abe_req_sent_to);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_SUBJECT)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_SUBJECT)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_SUBJECT, $this->abe_req_subject); $criteria->add(AbeRequestsPeer::ABE_REQ_SUBJECT, $this->abe_req_subject);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_BODY)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_BODY)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_BODY, $this->abe_req_body); $criteria->add(AbeRequestsPeer::ABE_REQ_BODY, $this->abe_req_body);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_DATE)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_DATE)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_DATE, $this->abe_req_date); $criteria->add(AbeRequestsPeer::ABE_REQ_DATE, $this->abe_req_date);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_STATUS)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_STATUS)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_STATUS, $this->abe_req_status); $criteria->add(AbeRequestsPeer::ABE_REQ_STATUS, $this->abe_req_status);
} }
if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_ANSWERED)) { if ($this->isColumnModified(AbeRequestsPeer::ABE_REQ_ANSWERED)) {
$criteria->add(AbeRequestsPeer::ABE_REQ_ANSWERED, $this->abe_req_answered); $criteria->add(AbeRequestsPeer::ABE_REQ_ANSWERED, $this->abe_req_answered);
} }
return $criteria; return $criteria;
} }
@@ -1056,5 +1058,3 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
} }
} }
// BaseAbeRequests

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/util/BasePeer.php'; require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class. // The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by AbeRequestsPeer::getOMClass() // actual class may be a subclass -- as returned by AbeRequestsPeer::getOMClass()
@@ -13,6 +14,7 @@ include_once 'classes/model/AbeRequests.php';
*/ */
abstract class BaseAbeRequestsPeer abstract class BaseAbeRequestsPeer
{ {
/** the default database name for this class */ /** the default database name for this class */
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
@@ -113,14 +115,11 @@ abstract class BaseAbeRequestsPeer
$map = AbeRequestsPeer::getTableMap(); $map = AbeRequestsPeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array(); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
self::$phpNameMap = $nameMap; self::$phpNameMap = $nameMap;
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
@@ -136,7 +135,6 @@ abstract class BaseAbeRequestsPeer
{ {
$toNames = self::getFieldNames($toType); $toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
@@ -406,8 +404,8 @@ abstract class BaseAbeRequestsPeer
/** /**
* Method perform an UPDATE on the database, given a AbeRequests or Criteria object. * Method perform an UPDATE on the database, given a AbeRequests or Criteria object.
* *
* @param mixed $values Criteria or AbeRequests object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or AbeRequests object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -427,7 +425,6 @@ abstract class BaseAbeRequestsPeer
$selectCriteria->add(AbeRequestsPeer::ABE_REQ_UID, $criteria->remove(AbeRequestsPeer::ABE_REQ_UID), $comparison); $selectCriteria->add(AbeRequestsPeer::ABE_REQ_UID, $criteria->remove(AbeRequestsPeer::ABE_REQ_UID), $comparison);
} else { } else {
// $values is AbeRequests object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
@@ -468,7 +465,8 @@ abstract class BaseAbeRequestsPeer
* @param mixed $values Criteria or AbeRequests object or primary key or array of primary keys * @param mixed $values Criteria or AbeRequests object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel. * if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -595,7 +593,6 @@ abstract class BaseAbeRequestsPeer
} }
} }
// BaseAbeRequestsPeer
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/om/BaseObject.php'; require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php'; require_once 'propel/om/Persistent.php';
@@ -17,6 +18,7 @@ include_once 'classes/model/AbeResponsesPeer.php';
*/ */
abstract class BaseAbeResponses extends BaseObject implements Persistent abstract class BaseAbeResponses 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
@@ -25,34 +27,29 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
*/ */
protected static $peer; protected static $peer;
/** /**
* The value for the abe_res_uid field. * The value for the abe_res_uid field.
* @var string * @var string
*/ */
protected $abe_res_uid = ''; protected $abe_res_uid = '';
/** /**
* The value for the abe_req_uid field. * The value for the abe_req_uid field.
* @var string * @var string
*/ */
protected $abe_req_uid = ''; protected $abe_req_uid = '';
/** /**
* The value for the abe_res_client_ip field. * The value for the abe_res_client_ip field.
* @var string * @var string
*/ */
protected $abe_res_client_ip = ''; protected $abe_res_client_ip = '';
/** /**
* The value for the abe_res_data field. * The value for the abe_res_data field.
* @var string * @var string
*/ */
protected $abe_res_data = '0'; protected $abe_res_data;
/** /**
* The value for the abe_res_date field. * The value for the abe_res_date field.
@@ -60,14 +57,12 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
*/ */
protected $abe_res_date; protected $abe_res_date;
/** /**
* The value for the abe_res_status field. * The value for the abe_res_status field.
* @var string * @var string
*/ */
protected $abe_res_status = ''; protected $abe_res_status = '';
/** /**
* The value for the abe_res_message field. * The value for the abe_res_message field.
* @var string * @var string
@@ -149,8 +144,8 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
// 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->abe_res_date); $ts = strtotime($this->abe_res_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 [abe_res_date] as date/time value: " .
throw new PropelException("Unable to parse value of [abe_res_date] as date/time value: " . var_export($this->abe_res_date, true)); var_export($this->abe_res_date, true));
} }
} else { } else {
$ts = $this->abe_res_date; $ts = $this->abe_res_date;
@@ -206,8 +201,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_UID; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_UID;
} }
} } // setAbeResUid()
// setAbeResUid()
/** /**
* Set the value of [abe_req_uid] column. * Set the value of [abe_req_uid] column.
@@ -229,8 +223,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_REQ_UID; $this->modifiedColumns[] = AbeResponsesPeer::ABE_REQ_UID;
} }
} } // setAbeReqUid()
// setAbeReqUid()
/** /**
* Set the value of [abe_res_client_ip] column. * Set the value of [abe_res_client_ip] column.
@@ -252,8 +245,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_CLIENT_IP; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_CLIENT_IP;
} }
} } // setAbeResClientIp()
// setAbeResClientIp()
/** /**
* Set the value of [abe_res_data] column. * Set the value of [abe_res_data] column.
@@ -270,13 +262,12 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->abe_res_data !== $v || $v === '0') { if ($this->abe_res_data !== $v) {
$this->abe_res_data = $v; $this->abe_res_data = $v;
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_DATA; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_DATA;
} }
} } // setAbeResData()
// setAbeResData()
/** /**
* Set the value of [abe_res_date] column. * Set the value of [abe_res_date] column.
@@ -289,9 +280,13 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
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 [abe_res_date] from input: " .
throw new PropelException("Unable to parse date/time value for [abe_res_date] from input: " . var_export($v, true)); var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -301,8 +296,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_DATE; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_DATE;
} }
} } // setAbeResDate()
// setAbeResDate()
/** /**
* Set the value of [abe_res_status] column. * Set the value of [abe_res_status] column.
@@ -324,8 +318,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_STATUS; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_STATUS;
} }
} } // setAbeResStatus()
// setAbeResStatus()
/** /**
* Set the value of [abe_res_message] column. * Set the value of [abe_res_message] column.
@@ -347,8 +340,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_MESSAGE; $this->modifiedColumns[] = AbeResponsesPeer::ABE_RES_MESSAGE;
} }
} } // setAbeResMessage()
// setAbeResMessage()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
@@ -429,7 +421,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
* 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()
*/ */
@@ -461,14 +453,13 @@ abstract class BaseAbeResponses 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()
*/ */
protected function doSave($con) protected function doSave($con)
{ {
$affectedRows = 0; $affectedRows = 0; // initialize var to track total num of affected rows
// initialize var to track total num of affected rows
if (!$this->alreadyInSave) { if (!$this->alreadyInSave) {
$this->alreadyInSave = true; $this->alreadyInSave = true;
@@ -477,8 +468,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
if ($this->isModified()) { if ($this->isModified()) {
if ($this->isNew()) { if ($this->isNew()) {
$pk = AbeResponsesPeer::doInsert($this, $con); $pk = AbeResponsesPeer::doInsert($this, $con);
$affectedRows += 1; $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// 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).
@@ -492,8 +482,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
$this->alreadyInSave = false; $this->alreadyInSave = false;
} }
return $affectedRows; return $affectedRows;
} } // doSave()
// doSave()
/** /**
* Array of ValidationFailed objects. * Array of ValidationFailed objects.
@@ -544,7 +533,8 @@ abstract class BaseAbeResponses 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)
{ {
@@ -616,8 +606,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
default: default:
return null; return null;
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -693,8 +682,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
case 6: case 6:
$this->setAbeResMessage($value); $this->setAbeResMessage($value);
break; break;
} } // switch()
// switch()
} }
/** /**
@@ -720,24 +708,31 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) { if (array_key_exists($keys[0], $arr)) {
$this->setAbeResUid($arr[$keys[0]]); $this->setAbeResUid($arr[$keys[0]]);
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setAbeReqUid($arr[$keys[1]]); $this->setAbeReqUid($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) { if (array_key_exists($keys[2], $arr)) {
$this->setAbeResClientIp($arr[$keys[2]]); $this->setAbeResClientIp($arr[$keys[2]]);
} }
if (array_key_exists($keys[3], $arr)) { if (array_key_exists($keys[3], $arr)) {
$this->setAbeResData($arr[$keys[3]]); $this->setAbeResData($arr[$keys[3]]);
} }
if (array_key_exists($keys[4], $arr)) { if (array_key_exists($keys[4], $arr)) {
$this->setAbeResDate($arr[$keys[4]]); $this->setAbeResDate($arr[$keys[4]]);
} }
if (array_key_exists($keys[5], $arr)) { if (array_key_exists($keys[5], $arr)) {
$this->setAbeResStatus($arr[$keys[5]]); $this->setAbeResStatus($arr[$keys[5]]);
} }
if (array_key_exists($keys[6], $arr)) { if (array_key_exists($keys[6], $arr)) {
$this->setAbeResMessage($arr[$keys[6]]); $this->setAbeResMessage($arr[$keys[6]]);
} }
} }
/** /**
@@ -752,25 +747,32 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_UID)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_UID)) {
$criteria->add(AbeResponsesPeer::ABE_RES_UID, $this->abe_res_uid); $criteria->add(AbeResponsesPeer::ABE_RES_UID, $this->abe_res_uid);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_REQ_UID)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_REQ_UID)) {
$criteria->add(AbeResponsesPeer::ABE_REQ_UID, $this->abe_req_uid); $criteria->add(AbeResponsesPeer::ABE_REQ_UID, $this->abe_req_uid);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_CLIENT_IP)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_CLIENT_IP)) {
$criteria->add(AbeResponsesPeer::ABE_RES_CLIENT_IP, $this->abe_res_client_ip); $criteria->add(AbeResponsesPeer::ABE_RES_CLIENT_IP, $this->abe_res_client_ip);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_DATA)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_DATA)) {
$criteria->add(AbeResponsesPeer::ABE_RES_DATA, $this->abe_res_data); $criteria->add(AbeResponsesPeer::ABE_RES_DATA, $this->abe_res_data);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_DATE)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_DATE)) {
$criteria->add(AbeResponsesPeer::ABE_RES_DATE, $this->abe_res_date); $criteria->add(AbeResponsesPeer::ABE_RES_DATE, $this->abe_res_date);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_STATUS)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_STATUS)) {
$criteria->add(AbeResponsesPeer::ABE_RES_STATUS, $this->abe_res_status); $criteria->add(AbeResponsesPeer::ABE_RES_STATUS, $this->abe_res_status);
} }
if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_MESSAGE)) { if ($this->isColumnModified(AbeResponsesPeer::ABE_RES_MESSAGE)) {
$criteria->add(AbeResponsesPeer::ABE_RES_MESSAGE, $this->abe_res_message); $criteria->add(AbeResponsesPeer::ABE_RES_MESSAGE, $this->abe_res_message);
} }
return $criteria; return $criteria;
} }
@@ -882,5 +884,3 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
} }
} }
// BaseAbeResponses

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once 'propel/util/BasePeer.php'; require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class. // The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by AbeResponsesPeer::getOMClass() // actual class may be a subclass -- as returned by AbeResponsesPeer::getOMClass()
@@ -13,6 +14,7 @@ include_once 'classes/model/AbeResponses.php';
*/ */
abstract class BaseAbeResponsesPeer abstract class BaseAbeResponsesPeer
{ {
/** the default database name for this class */ /** the default database name for this class */
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
@@ -104,14 +106,11 @@ abstract class BaseAbeResponsesPeer
$map = AbeResponsesPeer::getTableMap(); $map = AbeResponsesPeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array(); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
self::$phpNameMap = $nameMap; self::$phpNameMap = $nameMap;
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
@@ -127,11 +126,9 @@ abstract class BaseAbeResponsesPeer
{ {
$toNames = self::getFieldNames($toType); $toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
return $toNames[$key]; return $toNames[$key];
} }
@@ -149,7 +146,6 @@ abstract class BaseAbeResponsesPeer
if (!array_key_exists($type, self::$fieldNames)) { if (!array_key_exists($type, self::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
} }
return self::$fieldNames[$type]; return self::$fieldNames[$type];
} }
@@ -218,7 +214,6 @@ abstract class BaseAbeResponsesPeer
// clear out anything that might confuse the ORDER BY clause // clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns(); $criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(AbeResponsesPeer::COUNT_DISTINCT); $criteria->addSelectColumn(AbeResponsesPeer::COUNT_DISTINCT);
} else { } else {
@@ -252,11 +247,9 @@ abstract class BaseAbeResponsesPeer
$critcopy = clone $criteria; $critcopy = clone $criteria;
$critcopy->setLimit(1); $critcopy->setLimit(1);
$objects = AbeResponsesPeer::doSelect($critcopy, $con); $objects = AbeResponsesPeer::doSelect($critcopy, $con);
if ($objects) { if ($objects) {
return $objects[0]; return $objects[0];
} }
return null; return null;
} }
/** /**
@@ -326,7 +319,6 @@ abstract class BaseAbeResponsesPeer
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
@@ -397,8 +389,8 @@ abstract class BaseAbeResponsesPeer
/** /**
* Method perform an UPDATE on the database, given a AbeResponses or Criteria object. * Method perform an UPDATE on the database, given a AbeResponses or Criteria object.
* *
* @param mixed $values Criteria or AbeResponses object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or AbeResponses object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -418,7 +410,6 @@ abstract class BaseAbeResponsesPeer
$selectCriteria->add(AbeResponsesPeer::ABE_RES_UID, $criteria->remove(AbeResponsesPeer::ABE_RES_UID), $comparison); $selectCriteria->add(AbeResponsesPeer::ABE_RES_UID, $criteria->remove(AbeResponsesPeer::ABE_RES_UID), $comparison);
} else { } else {
// $values is AbeResponses object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
@@ -439,9 +430,7 @@ abstract class BaseAbeResponsesPeer
if ($con === null) { if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
@@ -461,7 +450,8 @@ abstract class BaseAbeResponsesPeer
* @param mixed $values Criteria or AbeResponses object or primary key or array of primary keys * @param mixed $values Criteria or AbeResponses object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel. * if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
@@ -577,7 +567,6 @@ abstract class BaseAbeResponsesPeer
} }
$objs = null; $objs = null;
if (empty($pks)) { if (empty($pks)) {
$objs = array(); $objs = array();
} else { } else {
@@ -585,12 +574,10 @@ abstract class BaseAbeResponsesPeer
$criteria->add(AbeResponsesPeer::ABE_RES_UID, $pks, Criteria::IN); $criteria->add(AbeResponsesPeer::ABE_RES_UID, $pks, Criteria::IN);
$objs = AbeResponsesPeer::doSelect($criteria, $con); $objs = AbeResponsesPeer::doSelect($criteria, $con);
} }
return $objs; return $objs;
} }
} }
// BaseAbeResponsesPeer
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {