PM-2376: New Feature: We need the ability to modify the Subject tables

This commit is contained in:
Paula V. Quispe
2015-04-22 17:40:15 -04:00
parent b30275a36d
commit f2f1a15372
6 changed files with 82 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ class AbeConfiguration extends BaseAbeConfiguration
private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE',
'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD',
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE');
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD');
public function load($abeUid)
{

View File

@@ -89,6 +89,7 @@ class AbeConfigurationMapBuilder
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, true, 100);
} // doBuild()
} // AbeConfigurationMapBuilder

View File

@@ -99,6 +99,12 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
*/
protected $abe_update_date;
/**
* The value for the abe_subject_field field.
* @var string
*/
protected $abe_subject_field;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -287,6 +293,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
}
}
/**
* Get the [abe_subject_field] column value.
*
* @return string
*/
public function getAbeSubjectField()
{
return $this->abe_subject_field;
}
/**
* Set the value of [abe_uid] column.
*
@@ -565,6 +582,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
} // setAbeUpdateDate()
/**
* Set the value of [abe_subject_field] column.
*
* @param string $v new value
* @return void
*/
public function setAbeSubjectField($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->abe_subject_field !== $v || $v === '') {
$this->abe_subject_field = $v;
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_SUBJECT_FIELD;
}
} // setAbeSubjectField()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -606,12 +645,14 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->abe_update_date = $rs->getTimestamp($startcol + 11, null);
$this->abe_subject_field = $rs->getString($startcol + 12, null);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 12; // 12 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 13; // 13 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AbeConfiguration object", $e);
@@ -851,6 +892,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
case 11:
return $this->getAbeUpdateDate();
break;
case 12:
return $this->getAbeSubjectField();
break;
default:
return null;
break;
@@ -883,6 +927,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$keys[9] => $this->getAbeCaseNoteInResponse(),
$keys[10] => $this->getAbeCreateDate(),
$keys[11] => $this->getAbeUpdateDate(),
$keys[12] => $this->getAbeSubjectField(),
);
return $result;
}
@@ -950,6 +995,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
case 11:
$this->setAbeUpdateDate($value);
break;
case 12:
$this->setAbeSubjectField($value);
break;
} // switch()
}
@@ -1021,6 +1069,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->setAbeUpdateDate($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setAbeSubjectField($arr[$keys[12]]);
}
}
/**
@@ -1080,6 +1131,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$criteria->add(AbeConfigurationPeer::ABE_UPDATE_DATE, $this->abe_update_date);
}
if ($this->isColumnModified(AbeConfigurationPeer::ABE_SUBJECT_FIELD)) {
$criteria->add(AbeConfigurationPeer::ABE_SUBJECT_FIELD, $this->abe_subject_field);
}
return $criteria;
}
@@ -1156,6 +1210,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$copyObj->setAbeUpdateDate($this->abe_update_date);
$copyObj->setAbeSubjectField($this->abe_subject_field);
$copyObj->setNew(true);

View File

@@ -67,6 +67,9 @@ abstract class BaseAbeConfigurationPeer
/** the column name for the ABE_UPDATE_DATE field */
const ABE_UPDATE_DATE = 'ABE_CONFIGURATION.ABE_UPDATE_DATE';
/** the column name for the ABE_SUBJECT_FIELD field */
const ABE_SUBJECT_FIELD = 'ABE_CONFIGURATION.ABE_SUBJECT_FIELD';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -78,10 +81,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
);
/**
@@ -91,10 +94,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
);
/**
@@ -219,6 +222,8 @@ abstract class BaseAbeConfigurationPeer
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UPDATE_DATE);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
}
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';

View File

@@ -4629,6 +4629,16 @@
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="ABE_SUBJECT_FIELD" type="VARCHAR" size="100" required="false" default="">
<vendor type="mysql">
<parameter name="Field" value="ABE_SUBJECT_FIELD"/>
<parameter name="Type" value="varchar(100)"/>
<parameter name="Null" value="NO"/>
<parameter name="Key" value=""/>
<parameter name="Default" value=""/>
<parameter name="Extra" value=""/>
</vendor>
</column>
</table>
<table name="ABE_REQUESTS">

View File

@@ -2643,6 +2643,7 @@ CREATE TABLE `ABE_CONFIGURATION`
`ABE_CASE_NOTE_IN_RESPONSE` INTEGER default 0,
`ABE_CREATE_DATE` DATETIME NOT NULL,
`ABE_UPDATE_DATE` DATETIME,
`ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL,
PRIMARY KEY (`ABE_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
#-----------------------------------------------------------------------------