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';
@@ -11,98 +12,87 @@ include_once 'classes/model/AbeConfigurationPeer.php';
/** /**
* Base class that represents a row from the 'ABE_CONFIGURATION' table. * Base class that represents a row from the 'ABE_CONFIGURATION' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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
* that calling code may not be able to identify. * that calling code may not be able to identify.
* @var AbeConfigurationPeer * @var AbeConfigurationPeer
*/ */
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
@@ -125,17 +115,18 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_uid] column value. * Get the [abe_uid] column value.
* *
* @return string * @return string
*/ */
public function getAbeUid() public function getAbeUid()
{ {
return $this->abe_uid; return $this->abe_uid;
} }
/** /**
* Get the [pro_uid] column value. * Get the [pro_uid] column value.
* *
* @return string * @return string
*/ */
public function getProUid() public function getProUid()
@@ -146,7 +137,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [tas_uid] column value. * Get the [tas_uid] column value.
* *
* @return string * @return string
*/ */
public function getTasUid() public function getTasUid()
@@ -157,7 +148,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_type] column value. * Get the [abe_type] column value.
* *
* @return string * @return string
*/ */
public function getAbeType() public function getAbeType()
@@ -168,7 +159,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_template] column value. * Get the [abe_template] column value.
* *
* @return string * @return string
*/ */
public function getAbeTemplate() public function getAbeTemplate()
@@ -179,7 +170,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_dyn_type] column value. * Get the [abe_dyn_type] column value.
* *
* @return string * @return string
*/ */
public function getAbeDynType() public function getAbeDynType()
@@ -190,7 +181,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [dyn_uid] column value. * Get the [dyn_uid] column value.
* *
* @return string * @return string
*/ */
public function getDynUid() public function getDynUid()
@@ -201,7 +192,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_email_field] column value. * Get the [abe_email_field] column value.
* *
* @return string * @return string
*/ */
public function getAbeEmailField() public function getAbeEmailField()
@@ -212,7 +203,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_action_field] column value. * Get the [abe_action_field] column value.
* *
* @return string * @return string
*/ */
public function getAbeActionField() public function getAbeActionField()
@@ -223,7 +214,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_case_note_in_response] column value. * Get the [abe_case_note_in_response] column value.
* *
* @return int * @return int
*/ */
public function getAbeCaseNoteInResponse() public function getAbeCaseNoteInResponse()
@@ -234,9 +225,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [optionally formatted] [abe_create_date] column value. * Get the [optionally formatted] [abe_create_date] column value.
* *
* @param string $format The date/time format string (either date()-style or strftime()-style). * @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. * 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). * @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. * @throws PropelException - if unable to convert the date/time to timestamp.
*/ */
@@ -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;
@@ -266,9 +257,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [optionally formatted] [abe_update_date] column value. * Get the [optionally formatted] [abe_update_date] column value.
* *
* @param string $format The date/time format string (either date()-style or strftime()-style). * @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. * 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). * @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. * @throws PropelException - if unable to convert the date/time to timestamp.
*/ */
@@ -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;
@@ -298,7 +289,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Set the value of [abe_uid] column. * Set the value of [abe_uid] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -316,12 +307,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -339,12 +329,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -362,12 +351,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -385,12 +373,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -408,12 +395,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -431,12 +417,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -454,12 +439,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -477,12 +461,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -500,12 +483,11 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -523,12 +505,11 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -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,12 +534,11 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -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()
*/ */
@@ -715,8 +702,8 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
if ($this->isNew()) { if ($this->isNew()) {
$pk = AbeConfigurationPeer::doInsert($this, $con); $pk = AbeConfigurationPeer::doInsert($this, $con);
$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 {
@@ -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()
@@ -7,12 +8,13 @@ include_once 'classes/model/AbeConfiguration.php';
/** /**
* Base static class for performing query and update operations on the 'ABE_CONFIGURATION' table. * Base static class for performing query and update operations on the 'ABE_CONFIGURATION' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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
* *
@@ -97,7 +100,7 @@ abstract class BaseAbeConfigurationPeer
/** /**
* @return MapBuilder the map builder for this peer * @return MapBuilder the map builder for this peer
* @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.
*/ */
public static function getMapBuilder() public static function getMapBuilder()
{ {
@@ -109,7 +112,7 @@ abstract class BaseAbeConfigurationPeer
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @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.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap() public static function getPhpNameMap()
@@ -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];
} }
@@ -173,8 +169,8 @@ abstract class BaseAbeConfigurationPeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* @param string $alias The alias for the current table. * @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. AbeConfigurationPeer::COLUMN_NAME). * @param string $column The column name for current table. (i.e. AbeConfigurationPeer::COLUMN_NAME).
@@ -194,10 +190,11 @@ abstract class BaseAbeConfigurationPeer
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @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.
*/ */
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.
* *
@@ -270,18 +265,16 @@ abstract class BaseAbeConfigurationPeer
* @param Connection $con * @param Connection $con
* @return AbeConfiguration * @return AbeConfiguration
* @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.
*/ */
public static function doSelectOne(Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
$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;
} }
/** /**
@@ -291,7 +284,7 @@ abstract class BaseAbeConfigurationPeer
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @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.
*/ */
public static function doSelect(Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
@@ -307,7 +300,7 @@ abstract class BaseAbeConfigurationPeer
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
@@ -334,7 +327,7 @@ abstract class BaseAbeConfigurationPeer
* objects that inherit from the default. * objects that inherit from the default.
* *
* @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.
*/ */
public static function populateObjects(ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
@@ -351,7 +344,6 @@ abstract class BaseAbeConfigurationPeer
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
@@ -359,7 +351,7 @@ abstract class BaseAbeConfigurationPeer
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* @return TableMap * @return TableMap
* @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.
*/ */
public static function getTableMap() public static function getTableMap()
{ {
@@ -387,7 +379,7 @@ abstract class BaseAbeConfigurationPeer
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @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.
*/ */
public static function doInsert($values, $con = null) public static function doInsert($values, $con = null)
{ {
@@ -422,11 +414,11 @@ 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.
*/ */
public static function doUpdate($values, $con = null) public static function doUpdate($values, $con = null)
{ {
@@ -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,11 +475,12 @@ 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).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* 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.
*/ */
public static function doDelete($values, $con = null) public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
@@ -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);
@@ -592,7 +583,7 @@ abstract class BaseAbeConfigurationPeer
* @param array $pks List of primary keys * @param array $pks List of primary keys
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
*/ */
public static function retrieveByPKs($pks, $con = null) public static function retrieveByPKs($pks, $con = null)
{ {
@@ -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';
@@ -11,69 +12,62 @@ include_once 'classes/model/AbeRequestsPeer.php';
/** /**
* Base class that represents a row from the 'ABE_REQUESTS' table. * Base class that represents a row from the 'ABE_REQUESTS' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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
* that calling code may not be able to identify. * that calling code may not be able to identify.
* @var AbeRequestsPeer * @var AbeRequestsPeer
*/ */
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
@@ -111,7 +103,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_uid] column value. * Get the [abe_req_uid] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqUid() public function getAbeReqUid()
@@ -122,7 +114,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_uid] column value. * Get the [abe_uid] column value.
* *
* @return string * @return string
*/ */
public function getAbeUid() public function getAbeUid()
@@ -133,7 +125,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [app_uid] column value. * Get the [app_uid] column value.
* *
* @return string * @return string
*/ */
public function getAppUid() public function getAppUid()
@@ -144,7 +136,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [del_index] column value. * Get the [del_index] column value.
* *
* @return int * @return int
*/ */
public function getDelIndex() public function getDelIndex()
@@ -155,7 +147,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_sent_to] column value. * Get the [abe_req_sent_to] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqSentTo() public function getAbeReqSentTo()
@@ -166,7 +158,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_subject] column value. * Get the [abe_req_subject] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqSubject() public function getAbeReqSubject()
@@ -177,7 +169,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_body] column value. * Get the [abe_req_body] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqBody() public function getAbeReqBody()
@@ -188,9 +180,9 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [optionally formatted] [abe_req_date] column value. * Get the [optionally formatted] [abe_req_date] column value.
* *
* @param string $format The date/time format string (either date()-style or strftime()-style). * @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. * 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). * @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. * @throws PropelException - if unable to convert the date/time to timestamp.
*/ */
@@ -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;
@@ -220,7 +212,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_status] column value. * Get the [abe_req_status] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqStatus() public function getAbeReqStatus()
@@ -231,7 +223,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Get the [abe_req_answered] column value. * Get the [abe_req_answered] column value.
* *
* @return int * @return int
*/ */
public function getAbeReqAnswered() public function getAbeReqAnswered()
@@ -242,7 +234,7 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
/** /**
* Set the value of [abe_req_uid] column. * Set the value of [abe_req_uid] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -260,12 +252,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -283,12 +274,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -306,12 +296,11 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -329,12 +318,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -352,12 +340,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -375,12 +362,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -393,17 +379,16 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -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,12 +413,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -447,12 +435,11 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -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;
@@ -607,22 +592,20 @@ abstract class BaseAbeRequests extends BaseObject implements Persistent
if ($this->isNew()) { if ($this->isNew()) {
$pk = AbeRequestsPeer::doInsert($this, $con); $pk = AbeRequestsPeer::doInsert($this, $con);
$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 += 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()
@@ -7,12 +8,13 @@ include_once 'classes/model/AbeRequests.php';
/** /**
* Base static class for performing query and update operations on the 'ABE_REQUESTS' table. * Base static class for performing query and update operations on the 'ABE_REQUESTS' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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';
@@ -64,11 +66,11 @@ abstract class BaseAbeRequestsPeer
/** /**
* holds an array of fieldnames * holds an array of fieldnames
* *
* first dimension keys are the type constants * first dimension keys are the type constants
* 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 ('AbeReqUid', 'AbeUid', 'AppUid', 'DelIndex', 'AbeReqSentTo', 'AbeReqSubject', 'AbeReqBody', 'AbeReqDate', 'AbeReqStatus', 'AbeReqAnswered', ), BasePeer::TYPE_PHPNAME => array ('AbeReqUid', 'AbeUid', 'AppUid', 'DelIndex', 'AbeReqSentTo', 'AbeReqSubject', 'AbeReqBody', 'AbeReqDate', 'AbeReqStatus', 'AbeReqAnswered', ),
BasePeer::TYPE_COLNAME => array (AbeRequestsPeer::ABE_REQ_UID, AbeRequestsPeer::ABE_UID, AbeRequestsPeer::APP_UID, AbeRequestsPeer::DEL_INDEX, AbeRequestsPeer::ABE_REQ_SENT_TO, AbeRequestsPeer::ABE_REQ_SUBJECT, AbeRequestsPeer::ABE_REQ_BODY, AbeRequestsPeer::ABE_REQ_DATE, AbeRequestsPeer::ABE_REQ_STATUS, AbeRequestsPeer::ABE_REQ_ANSWERED, ), BasePeer::TYPE_COLNAME => array (AbeRequestsPeer::ABE_REQ_UID, AbeRequestsPeer::ABE_UID, AbeRequestsPeer::APP_UID, AbeRequestsPeer::DEL_INDEX, AbeRequestsPeer::ABE_REQ_SENT_TO, AbeRequestsPeer::ABE_REQ_SUBJECT, AbeRequestsPeer::ABE_REQ_BODY, AbeRequestsPeer::ABE_REQ_DATE, AbeRequestsPeer::ABE_REQ_STATUS, AbeRequestsPeer::ABE_REQ_ANSWERED, ),
@@ -77,11 +79,11 @@ abstract class BaseAbeRequestsPeer
); );
/** /**
* holds an array of keys for quick access to the fieldnames array * holds an array of keys for quick access to the fieldnames array
* *
* first dimension keys are the type constants * first dimension keys are the type constants
* 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 ('AbeReqUid' => 0, 'AbeUid' => 1, 'AppUid' => 2, 'DelIndex' => 3, 'AbeReqSentTo' => 4, 'AbeReqSubject' => 5, 'AbeReqBody' => 6, 'AbeReqDate' => 7, 'AbeReqStatus' => 8, 'AbeReqAnswered' => 9, ), BasePeer::TYPE_PHPNAME => array ('AbeReqUid' => 0, 'AbeUid' => 1, 'AppUid' => 2, 'DelIndex' => 3, 'AbeReqSentTo' => 4, 'AbeReqSubject' => 5, 'AbeReqBody' => 6, 'AbeReqDate' => 7, 'AbeReqStatus' => 8, 'AbeReqAnswered' => 9, ),
BasePeer::TYPE_COLNAME => array (AbeRequestsPeer::ABE_REQ_UID => 0, AbeRequestsPeer::ABE_UID => 1, AbeRequestsPeer::APP_UID => 2, AbeRequestsPeer::DEL_INDEX => 3, AbeRequestsPeer::ABE_REQ_SENT_TO => 4, AbeRequestsPeer::ABE_REQ_SUBJECT => 5, AbeRequestsPeer::ABE_REQ_BODY => 6, AbeRequestsPeer::ABE_REQ_DATE => 7, AbeRequestsPeer::ABE_REQ_STATUS => 8, AbeRequestsPeer::ABE_REQ_ANSWERED => 9, ), BasePeer::TYPE_COLNAME => array (AbeRequestsPeer::ABE_REQ_UID => 0, AbeRequestsPeer::ABE_UID => 1, AbeRequestsPeer::APP_UID => 2, AbeRequestsPeer::DEL_INDEX => 3, AbeRequestsPeer::ABE_REQ_SENT_TO => 4, AbeRequestsPeer::ABE_REQ_SUBJECT => 5, AbeRequestsPeer::ABE_REQ_BODY => 6, AbeRequestsPeer::ABE_REQ_DATE => 7, AbeRequestsPeer::ABE_REQ_STATUS => 8, AbeRequestsPeer::ABE_REQ_ANSWERED => 9, ),
@@ -90,10 +92,10 @@ abstract class BaseAbeRequestsPeer
); );
/** /**
* @return MapBuilder the map builder for this peer * @return MapBuilder the map builder for this peer
* @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.
*/ */
public static function getMapBuilder() public static function getMapBuilder()
{ {
include_once 'classes/model/map/AbeRequestsMapBuilder.php'; include_once 'classes/model/map/AbeRequestsMapBuilder.php';
@@ -104,7 +106,7 @@ abstract class BaseAbeRequestsPeer
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @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.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap() public static function getPhpNameMap()
@@ -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));
} }
@@ -165,8 +163,8 @@ abstract class BaseAbeRequestsPeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* @param string $alias The alias for the current table. * @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. AbeRequestsPeer::COLUMN_NAME). * @param string $column The column name for current table. (i.e. AbeRequestsPeer::COLUMN_NAME).
@@ -186,7 +184,7 @@ abstract class BaseAbeRequestsPeer
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @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.
*/ */
public static function addSelectColumns(Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
@@ -257,7 +255,7 @@ abstract class BaseAbeRequestsPeer
* @param Connection $con * @param Connection $con
* @return AbeRequests * @return AbeRequests
* @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.
*/ */
public static function doSelectOne(Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
@@ -276,7 +274,7 @@ abstract class BaseAbeRequestsPeer
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @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.
*/ */
public static function doSelect(Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
@@ -292,7 +290,7 @@ abstract class BaseAbeRequestsPeer
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
@@ -319,7 +317,7 @@ abstract class BaseAbeRequestsPeer
* objects that inherit from the default. * objects that inherit from the default.
* *
* @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.
*/ */
public static function populateObjects(ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
@@ -343,7 +341,7 @@ abstract class BaseAbeRequestsPeer
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* @return TableMap * @return TableMap
* @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.
*/ */
public static function getTableMap() public static function getTableMap()
{ {
@@ -371,7 +369,7 @@ abstract class BaseAbeRequestsPeer
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @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.
*/ */
public static function doInsert($values, $con = null) public static function doInsert($values, $con = null)
{ {
@@ -406,11 +404,11 @@ 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.
*/ */
public static function doUpdate($values, $con = null) public static function doUpdate($values, $con = null)
{ {
@@ -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,11 +465,12 @@ 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).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* 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.
*/ */
public static function doDelete($values, $con = null) public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
@@ -575,7 +573,7 @@ abstract class BaseAbeRequestsPeer
* @param array $pks List of primary keys * @param array $pks List of primary keys
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
*/ */
public static function retrieveByPKs($pks, $con = null) public static function retrieveByPKs($pks, $con = null)
{ {
@@ -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';
@@ -11,48 +12,44 @@ include_once 'classes/model/AbeResponsesPeer.php';
/** /**
* Base class that represents a row from the 'ABE_RESPONSES' table. * Base class that represents a row from the 'ABE_RESPONSES' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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
* that calling code may not be able to identify. * that calling code may not be able to identify.
* @var AbeResponsesPeer * @var AbeResponsesPeer
*/ */
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
@@ -90,7 +85,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_res_uid] column value. * Get the [abe_res_uid] column value.
* *
* @return string * @return string
*/ */
public function getAbeResUid() public function getAbeResUid()
@@ -101,7 +96,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_req_uid] column value. * Get the [abe_req_uid] column value.
* *
* @return string * @return string
*/ */
public function getAbeReqUid() public function getAbeReqUid()
@@ -112,7 +107,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_res_client_ip] column value. * Get the [abe_res_client_ip] column value.
* *
* @return string * @return string
*/ */
public function getAbeResClientIp() public function getAbeResClientIp()
@@ -123,7 +118,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_res_data] column value. * Get the [abe_res_data] column value.
* *
* @return string * @return string
*/ */
public function getAbeResData() public function getAbeResData()
@@ -134,9 +129,9 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [optionally formatted] [abe_res_date] column value. * Get the [optionally formatted] [abe_res_date] column value.
* *
* @param string $format The date/time format string (either date()-style or strftime()-style). * @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. * 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). * @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. * @throws PropelException - if unable to convert the date/time to timestamp.
*/ */
@@ -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;
@@ -166,7 +161,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_res_status] column value. * Get the [abe_res_status] column value.
* *
* @return string * @return string
*/ */
public function getAbeResStatus() public function getAbeResStatus()
@@ -177,7 +172,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Get the [abe_res_message] column value. * Get the [abe_res_message] column value.
* *
* @return string * @return string
*/ */
public function getAbeResMessage() public function getAbeResMessage()
@@ -188,7 +183,7 @@ abstract class BaseAbeResponses extends BaseObject implements Persistent
/** /**
* Set the value of [abe_res_uid] column. * Set the value of [abe_res_uid] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -206,12 +201,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -229,12 +223,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -252,12 +245,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -270,17 +262,16 @@ 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.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
@@ -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,12 +296,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -324,12 +318,11 @@ 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.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -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,10 +468,9 @@ 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).
$this->setNew(false); $this->setNew(false);
} else { } else {
@@ -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()
@@ -7,12 +8,13 @@ include_once 'classes/model/AbeResponses.php';
/** /**
* Base static class for performing query and update operations on the 'ABE_RESPONSES' table. * Base static class for performing query and update operations on the 'ABE_RESPONSES' table.
* *
* *
* *
* @package workflow.classes.model.om * @package workflow.classes.model.om
*/ */
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';
@@ -83,7 +85,7 @@ abstract class BaseAbeResponsesPeer
/** /**
* @return MapBuilder the map builder for this peer * @return MapBuilder the map builder for this peer
* @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.
*/ */
public static function getMapBuilder() public static function getMapBuilder()
{ {
@@ -95,7 +97,7 @@ abstract class BaseAbeResponsesPeer
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @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.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap() public static function getPhpNameMap()
@@ -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];
} }
@@ -158,8 +154,8 @@ abstract class BaseAbeResponsesPeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* @param string $alias The alias for the current table. * @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. AbeResponsesPeer::COLUMN_NAME). * @param string $column The column name for current table. (i.e. AbeResponsesPeer::COLUMN_NAME).
@@ -179,7 +175,7 @@ abstract class BaseAbeResponsesPeer
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @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.
*/ */
public static function addSelectColumns(Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
@@ -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 {
@@ -245,18 +240,16 @@ abstract class BaseAbeResponsesPeer
* @param Connection $con * @param Connection $con
* @return AbeResponses * @return AbeResponses
* @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.
*/ */
public static function doSelectOne(Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
$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;
} }
/** /**
@@ -266,7 +259,7 @@ abstract class BaseAbeResponsesPeer
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @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.
*/ */
public static function doSelect(Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
@@ -282,7 +275,7 @@ abstract class BaseAbeResponsesPeer
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
@@ -309,7 +302,7 @@ abstract class BaseAbeResponsesPeer
* objects that inherit from the default. * objects that inherit from the default.
* *
* @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.
*/ */
public static function populateObjects(ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
@@ -326,7 +319,6 @@ abstract class BaseAbeResponsesPeer
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
@@ -334,7 +326,7 @@ abstract class BaseAbeResponsesPeer
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* @return TableMap * @return TableMap
* @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.
*/ */
public static function getTableMap() public static function getTableMap()
{ {
@@ -362,7 +354,7 @@ abstract class BaseAbeResponsesPeer
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @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.
*/ */
public static function doInsert($values, $con = null) public static function doInsert($values, $con = null)
{ {
@@ -397,11 +389,11 @@ 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.
*/ */
public static function doUpdate($values, $con = null) public static function doUpdate($values, $con = null)
{ {
@@ -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,11 +450,12 @@ 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).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* 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.
*/ */
public static function doDelete($values, $con = null) public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
@@ -568,7 +558,7 @@ abstract class BaseAbeResponsesPeer
* @param array $pks List of primary keys * @param array $pks List of primary keys
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @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.
*/ */
public static function retrieveByPKs($pks, $con = null) public static function retrieveByPKs($pks, $con = null)
{ {
@@ -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()) {