+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2016 |
+| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
*/
/**
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Mailing/MailingJob.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:df7f5d74b6be9d995c7990e4315bfe40)
+ * (GenCodeChecksum:0d980fe5408cdcfa95a640da20a9f2f2)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Mailing_DAO_MailingJob constructor.
+ */
class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO {
/**
- * static instance to hold the table name
+ * Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_mailing_job';
/**
- * static instance to hold the field values
- *
- * @var array
- */
- static $_fields = null;
- /**
- * static instance to hold the FK relationships
- *
- * @var string
- */
- static $_links = null;
- /**
- * static value to see if we should log any modifications to
- * this table in the civicrm_log table
+ * Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
*/
public $job_limit;
/**
- * class constructor
- *
- * @return civicrm_mailing_job
+ * Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_mailing_job';
parent::__construct();
}
/**
- * Returns foreign keys and entity references
+ * Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
- if (!self::$_links) {
- self::$_links = static ::createReferenceColumns(__CLASS__);
- self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
- self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_mailing_job', 'id');
+ if (!isset(Civi::$statics[__CLASS__]['links'])) {
+ Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
+ Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
+ Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_mailing_job', 'id');
+ CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
- return self::$_links;
+ return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
* @return array
*/
static function &fields() {
- if (!(self::$_fields)) {
- self::$_fields = array(
+ if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+ Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Mailing Job ID') ,
'required' => true,
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'mailing_id' => array(
'name' => 'mailing_id',
'title' => ts('Mailing') ,
'description' => 'The ID of the mailing this Job will send.',
'required' => true,
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
'FKClassName' => 'CRM_Mailing_DAO_Mailing',
) ,
'scheduled_date' => array(
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Mailing Scheduled Date') ,
'description' => 'date on which this job was scheduled.',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'start_date' => array(
'name' => 'start_date',
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Mailing Job Start Date') ,
'description' => 'date on which this job was started.',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'end_date' => array(
'name' => 'end_date',
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Mailing Job End Date') ,
'description' => 'date on which this job ended.',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'status' => array(
'name' => 'status',
'description' => 'The state of this job',
'maxlength' => 12,
'size' => CRM_Utils_Type::TWELVE,
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
'html' => array(
'type' => 'Select',
) ,
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Mailing Job Is Test?') ,
'description' => 'Is this job for a test mail?',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'job_type' => array(
'name' => 'job_type',
'description' => 'Type of mailling job: null | child ',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'parent_id' => array(
'name' => 'parent_id',
'title' => ts('Mailing Job Parent') ,
'description' => 'Parent job id',
'default' => 'NULL',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
) ,
'job_offset' => array(
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Mailing Job Offset') ,
'description' => 'Offset of the child job',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
'job_limit' => array(
'name' => 'job_limit',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Mailing Job Limit') ,
'description' => 'Queue size limit for each child job',
+ 'table_name' => 'civicrm_mailing_job',
+ 'entity' => 'MailingJob',
+ 'bao' => 'CRM_Mailing_BAO_MailingJob',
) ,
);
+ CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
- return self::$_fields;
+ return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).