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 keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
75 * The ID of the mailing this Job will send.
81 * date on which this job was scheduled.
85 public $scheduled_date;
87 * date on which this job was started.
93 * date on which this job ended.
99 * The state of this job
105 * Is this job for a test mail?
111 * Type of mailling job: null | child
123 * Offset of the child job
129 * Queue size limit for each child job
137 * @return civicrm_mailing_job
139 function __construct() {
140 $this->__table
= 'civicrm_mailing_job';
141 parent
::__construct();
144 * Returns foreign keys and entity references
147 * [CRM_Core_Reference_Interface]
149 static function getReferenceColumns() {
150 if (!self
::$_links) {
151 self
::$_links = static ::createReferenceColumns(__CLASS__
);
152 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
153 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'parent_id', 'civicrm_mailing_job', 'id');
155 return self
::$_links;
158 * Returns all the column names of this table
162 static function &fields() {
163 if (!(self
::$_fields)) {
164 self
::$_fields = array(
167 'type' => CRM_Utils_Type
::T_INT
,
168 'title' => ts('Mailing Job ID') ,
171 'mailing_id' => array(
172 'name' => 'mailing_id',
173 'type' => CRM_Utils_Type
::T_INT
,
174 'title' => ts('Mailing') ,
175 'description' => 'The ID of the mailing this Job will send.',
177 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
179 'scheduled_date' => array(
180 'name' => 'scheduled_date',
181 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
182 'title' => ts('Mailing Scheduled Date') ,
183 'description' => 'date on which this job was scheduled.',
185 'start_date' => array(
186 'name' => 'start_date',
187 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
188 'title' => ts('Mailing Job Start Date') ,
189 'description' => 'date on which this job was started.',
192 'name' => 'end_date',
193 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
194 'title' => ts('Mailing Job End Date') ,
195 'description' => 'date on which this job ended.',
199 'type' => CRM_Utils_Type
::T_STRING
,
200 'title' => ts('Mailing Job Status') ,
201 'description' => 'The state of this job',
203 'size' => CRM_Utils_Type
::TWELVE
,
207 'pseudoconstant' => array(
208 'callback' => 'CRM_Core_SelectValues::getMailingJobStatus',
213 'type' => CRM_Utils_Type
::T_BOOLEAN
,
214 'title' => ts('Mailing Job Is Test?') ,
215 'description' => 'Is this job for a test mail?',
218 'name' => 'job_type',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Mailing Job Type') ,
221 'description' => 'Type of mailling job: null | child ',
223 'size' => CRM_Utils_Type
::HUGE
,
225 'parent_id' => array(
226 'name' => 'parent_id',
227 'type' => CRM_Utils_Type
::T_INT
,
228 'title' => ts('Mailing Job Parent') ,
229 'description' => 'Parent job id',
231 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
233 'job_offset' => array(
234 'name' => 'job_offset',
235 'type' => CRM_Utils_Type
::T_INT
,
236 'title' => ts('Mailing Job Offset') ,
237 'description' => 'Offset of the child job',
239 'job_limit' => array(
240 'name' => 'job_limit',
241 'type' => CRM_Utils_Type
::T_INT
,
242 'title' => ts('Mailing Job Limit') ,
243 'description' => 'Queue size limit for each child job',
247 return self
::$_fields;
250 * Returns an array containing, for each field, the arary key used for that
251 * field in self::$_fields.
255 static function &fieldKeys() {
256 if (!(self
::$_fieldKeys)) {
257 self
::$_fieldKeys = array(
259 'mailing_id' => 'mailing_id',
260 'scheduled_date' => 'scheduled_date',
261 'start_date' => 'start_date',
262 'end_date' => 'end_date',
263 'status' => 'status',
264 'is_test' => 'is_test',
265 'job_type' => 'job_type',
266 'parent_id' => 'parent_id',
267 'job_offset' => 'job_offset',
268 'job_limit' => 'job_limit',
271 return self
::$_fieldKeys;
274 * Returns the names of this table
278 static function getTableName() {
279 return self
::$_tableName;
282 * Returns if this table needs to be logged
290 * Returns the list of fields that can be imported
292 * @param bool $prefix
296 static function &import($prefix = false) {
297 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_job', $prefix, array());
301 * Returns the list of fields that can be exported
303 * @param bool $prefix
307 static function &export($prefix = false) {
308 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_job', $prefix, array());