3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Mailing/Event/Queue.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:1791a9127131362b0224dd2781085e4a)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Mailing_Event_DAO_Queue constructor.
40 class CRM_Mailing_Event_DAO_Queue
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_mailing_event_queue';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
91 function __construct() {
92 $this->__table
= 'civicrm_mailing_event_queue';
93 parent
::__construct();
96 * Returns foreign keys and entity references.
99 * [CRM_Core_Reference_Interface]
101 static function getReferenceColumns() {
102 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
103 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
104 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'job_id', 'civicrm_mailing_job', 'id');
105 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'email_id', 'civicrm_email', 'id');
106 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
107 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'phone_id', 'civicrm_phone', 'id');
108 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
110 return Civi
::$statics[__CLASS__
]['links'];
113 * Returns all the column names of this table
117 static function &fields() {
118 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
119 Civi
::$statics[__CLASS__
]['fields'] = array(
122 'type' => CRM_Utils_Type
::T_INT
,
123 'title' => ts('Mailing Event Queue ID') ,
125 'table_name' => 'civicrm_mailing_event_queue',
127 'bao' => 'CRM_Mailing_Event_BAO_Queue',
132 'type' => CRM_Utils_Type
::T_INT
,
133 'title' => ts('Job ID') ,
134 'description' => 'FK to Job',
136 'table_name' => 'civicrm_mailing_event_queue',
138 'bao' => 'CRM_Mailing_Event_BAO_Queue',
140 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
143 'name' => 'email_id',
144 'type' => CRM_Utils_Type
::T_INT
,
145 'title' => ts('Email ID') ,
146 'description' => 'FK to Email',
148 'table_name' => 'civicrm_mailing_event_queue',
150 'bao' => 'CRM_Mailing_Event_BAO_Queue',
152 'FKClassName' => 'CRM_Core_DAO_Email',
154 'contact_id' => array(
155 'name' => 'contact_id',
156 'type' => CRM_Utils_Type
::T_INT
,
157 'title' => ts('Contact ID') ,
158 'description' => 'FK to Contact',
160 'table_name' => 'civicrm_mailing_event_queue',
162 'bao' => 'CRM_Mailing_Event_BAO_Queue',
164 'FKClassName' => 'CRM_Contact_DAO_Contact',
168 'type' => CRM_Utils_Type
::T_STRING
,
169 'title' => ts('Security Hash') ,
170 'description' => 'Security hash',
173 'size' => CRM_Utils_Type
::HUGE
,
174 'table_name' => 'civicrm_mailing_event_queue',
176 'bao' => 'CRM_Mailing_Event_BAO_Queue',
180 'name' => 'phone_id',
181 'type' => CRM_Utils_Type
::T_INT
,
182 'title' => ts('Phone ID') ,
183 'description' => 'FK to Phone',
185 'table_name' => 'civicrm_mailing_event_queue',
187 'bao' => 'CRM_Mailing_Event_BAO_Queue',
189 'FKClassName' => 'CRM_Core_DAO_Phone',
192 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
194 return Civi
::$statics[__CLASS__
]['fields'];
197 * Return a mapping from field-name to the corresponding key (as used in fields()).
200 * Array(string $name => string $uniqueName).
202 static function &fieldKeys() {
203 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
204 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
206 return Civi
::$statics[__CLASS__
]['fieldKeys'];
209 * Returns the names of this table
213 static function getTableName() {
214 return self
::$_tableName;
217 * Returns if this table needs to be logged
225 * Returns the list of fields that can be imported
227 * @param bool $prefix
231 static function &import($prefix = false) {
232 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_event_queue', $prefix, array());
236 * Returns the list of fields that can be exported
238 * @param bool $prefix
242 static function &export($prefix = false) {
243 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_event_queue', $prefix, array());