3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Mailing/MailingJob.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:df7f5d74b6be9d995c7990e4315bfe40)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Mailing_DAO_MailingJob
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_mailing_job';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the FK relationships
55 static $_links = null;
57 * static value to see if we should log any modifications to
58 * this table in the civicrm_log table
69 * The ID of the mailing this Job will send.
75 * date on which this job was scheduled.
79 public $scheduled_date;
81 * date on which this job was started.
87 * date on which this job ended.
93 * The state of this job
99 * Is this job for a test mail?
105 * Type of mailling job: null | child
117 * Offset of the child job
123 * Queue size limit for each child job
131 * @return civicrm_mailing_job
133 function __construct() {
134 $this->__table
= 'civicrm_mailing_job';
135 parent
::__construct();
138 * Returns foreign keys and entity references
141 * [CRM_Core_Reference_Interface]
143 static function getReferenceColumns() {
144 if (!self
::$_links) {
145 self
::$_links = static ::createReferenceColumns(__CLASS__
);
146 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
147 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'parent_id', 'civicrm_mailing_job', 'id');
149 return self
::$_links;
152 * Returns all the column names of this table
156 static function &fields() {
157 if (!(self
::$_fields)) {
158 self
::$_fields = array(
161 'type' => CRM_Utils_Type
::T_INT
,
162 'title' => ts('Mailing Job ID') ,
165 'mailing_id' => array(
166 'name' => 'mailing_id',
167 'type' => CRM_Utils_Type
::T_INT
,
168 'title' => ts('Mailing') ,
169 'description' => 'The ID of the mailing this Job will send.',
171 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
173 'scheduled_date' => array(
174 'name' => 'scheduled_date',
175 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
176 'title' => ts('Mailing Scheduled Date') ,
177 'description' => 'date on which this job was scheduled.',
179 'start_date' => array(
180 'name' => 'start_date',
181 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
182 'title' => ts('Mailing Job Start Date') ,
183 'description' => 'date on which this job was started.',
186 'name' => 'end_date',
187 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
188 'title' => ts('Mailing Job End Date') ,
189 'description' => 'date on which this job ended.',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('Mailing Job Status') ,
195 'description' => 'The state of this job',
197 'size' => CRM_Utils_Type
::TWELVE
,
201 'pseudoconstant' => array(
202 'callback' => 'CRM_Core_SelectValues::getMailingJobStatus',
207 'type' => CRM_Utils_Type
::T_BOOLEAN
,
208 'title' => ts('Mailing Job Is Test?') ,
209 'description' => 'Is this job for a test mail?',
212 'name' => 'job_type',
213 'type' => CRM_Utils_Type
::T_STRING
,
214 'title' => ts('Mailing Job Type') ,
215 'description' => 'Type of mailling job: null | child ',
217 'size' => CRM_Utils_Type
::HUGE
,
219 'parent_id' => array(
220 'name' => 'parent_id',
221 'type' => CRM_Utils_Type
::T_INT
,
222 'title' => ts('Mailing Job Parent') ,
223 'description' => 'Parent job id',
225 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
227 'job_offset' => array(
228 'name' => 'job_offset',
229 'type' => CRM_Utils_Type
::T_INT
,
230 'title' => ts('Mailing Job Offset') ,
231 'description' => 'Offset of the child job',
233 'job_limit' => array(
234 'name' => 'job_limit',
235 'type' => CRM_Utils_Type
::T_INT
,
236 'title' => ts('Mailing Job Limit') ,
237 'description' => 'Queue size limit for each child job',
241 return self
::$_fields;
244 * Return a mapping from field-name to the corresponding key (as used in fields()).
247 * Array(string $name => string $uniqueName).
249 static function &fieldKeys() {
250 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
251 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
253 return Civi
::$statics[__CLASS__
]['fieldKeys'];
256 * Returns the names of this table
260 static function getTableName() {
261 return self
::$_tableName;
264 * Returns if this table needs to be logged
272 * Returns the list of fields that can be imported
274 * @param bool $prefix
278 static function &import($prefix = false) {
279 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_job', $prefix, array());
283 * Returns the list of fields that can be exported
285 * @param bool $prefix
289 static function &export($prefix = false) {
290 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_job', $prefix, array());