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/Queue/QueueItem.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:45218486c40b902ee5e043e22b1a7d20)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Queue_DAO_QueueItem
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_queue_item';
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 instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
89 * Name of the queue which includes this item
100 * date on which this item was submitted to the queue
106 * date on which this job becomes available; null if ASAP
110 public $release_time;
120 * @return civicrm_queue_item
122 function __construct() {
123 $this->__table
= 'civicrm_queue_item';
124 parent
::__construct();
127 * Returns all the column names of this table
131 static function &fields() {
132 if (!(self
::$_fields)) {
133 self
::$_fields = array(
136 'type' => CRM_Utils_Type
::T_INT
,
137 'title' => ts('Queue ID') ,
140 'queue_name' => array(
141 'name' => 'queue_name',
142 'type' => CRM_Utils_Type
::T_STRING
,
143 'title' => ts('Queue Name') ,
144 'description' => 'Name of the queue which includes this item',
147 'size' => CRM_Utils_Type
::BIG
,
154 'type' => CRM_Utils_Type
::T_INT
,
155 'title' => ts('Order') ,
161 'submit_time' => array(
162 'name' => 'submit_time',
163 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
164 'title' => ts('Submit Time') ,
165 'description' => 'date on which this item was submitted to the queue',
168 'type' => 'Select Date',
171 'release_time' => array(
172 'name' => 'release_time',
173 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
174 'title' => ts('Release Time') ,
175 'description' => 'date on which this job becomes available; null if ASAP',
177 'type' => 'Select Date',
182 'type' => CRM_Utils_Type
::T_TEXT
,
183 'title' => ts('Queue item datas') ,
184 'description' => 'Serialized queue',
188 return self
::$_fields;
191 * Returns an array containing, for each field, the arary key used for that
192 * field in self::$_fields.
196 static function &fieldKeys() {
197 if (!(self
::$_fieldKeys)) {
198 self
::$_fieldKeys = array(
200 'queue_name' => 'queue_name',
201 'weight' => 'weight',
202 'submit_time' => 'submit_time',
203 'release_time' => 'release_time',
207 return self
::$_fieldKeys;
210 * Returns the names of this table
214 static function getTableName() {
215 return self
::$_tableName;
218 * Returns if this table needs to be logged
226 * Returns the list of fields that can be imported
228 * @param bool $prefix
232 static function &import($prefix = false) {
233 if (!(self
::$_import)) {
234 self
::$_import = array();
235 $fields = self
::fields();
236 foreach($fields as $name => $field) {
237 if (CRM_Utils_Array
::value('import', $field)) {
239 self
::$_import['queue_item'] = & $fields[$name];
241 self
::$_import[$name] = & $fields[$name];
246 return self
::$_import;
249 * Returns the list of fields that can be exported
251 * @param bool $prefix
255 static function &export($prefix = false) {
256 if (!(self
::$_export)) {
257 self
::$_export = array();
258 $fields = self
::fields();
259 foreach($fields as $name => $field) {
260 if (CRM_Utils_Array
::value('export', $field)) {
262 self
::$_export['queue_item'] = & $fields[$name];
264 self
::$_export[$name] = & $fields[$name];
269 return self
::$_export;