5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Queue/QueueItem.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:ab2c0a25c3fd72fd4911003d325dbcb6)
13 * Database access object for the QueueItem entity.
15 class CRM_Queue_DAO_QueueItem
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_queue_item';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
37 * Name of the queue which includes this item
49 * date on which this item was submitted to the queue
56 * date on which this job becomes available; null if ASAP
63 * Serialized queue data
72 public function __construct() {
73 $this->__table
= 'civicrm_queue_item';
74 parent
::__construct();
78 * Returns all the column names of this table
82 public static function &fields() {
83 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
84 Civi
::$statics[__CLASS__
]['fields'] = [
87 'type' => CRM_Utils_Type
::T_INT
,
88 'title' => ts('Queue ID'),
90 'where' => 'civicrm_queue_item.id',
91 'table_name' => 'civicrm_queue_item',
92 'entity' => 'QueueItem',
93 'bao' => 'CRM_Queue_BAO_QueueItem',
97 'name' => 'queue_name',
98 'type' => CRM_Utils_Type
::T_STRING
,
99 'title' => ts('Queue Name'),
100 'description' => ts('Name of the queue which includes this item'),
103 'size' => CRM_Utils_Type
::BIG
,
104 'where' => 'civicrm_queue_item.queue_name',
105 'table_name' => 'civicrm_queue_item',
106 'entity' => 'QueueItem',
107 'bao' => 'CRM_Queue_BAO_QueueItem',
115 'type' => CRM_Utils_Type
::T_INT
,
116 'title' => ts('Order'),
118 'where' => 'civicrm_queue_item.weight',
119 'table_name' => 'civicrm_queue_item',
120 'entity' => 'QueueItem',
121 'bao' => 'CRM_Queue_BAO_QueueItem',
128 'name' => 'submit_time',
129 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
130 'title' => ts('Submit Time'),
131 'description' => ts('date on which this item was submitted to the queue'),
133 'where' => 'civicrm_queue_item.submit_time',
134 'table_name' => 'civicrm_queue_item',
135 'entity' => 'QueueItem',
136 'bao' => 'CRM_Queue_BAO_QueueItem',
139 'type' => 'Select Date',
143 'name' => 'release_time',
144 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
145 'title' => ts('Release Time'),
146 'description' => ts('date on which this job becomes available; null if ASAP'),
147 'where' => 'civicrm_queue_item.release_time',
148 'table_name' => 'civicrm_queue_item',
149 'entity' => 'QueueItem',
150 'bao' => 'CRM_Queue_BAO_QueueItem',
153 'type' => 'Select Date',
158 'type' => CRM_Utils_Type
::T_TEXT
,
159 'title' => ts('Queue item data'),
160 'description' => ts('Serialized queue data'),
161 'where' => 'civicrm_queue_item.data',
162 'table_name' => 'civicrm_queue_item',
163 'entity' => 'QueueItem',
164 'bao' => 'CRM_Queue_BAO_QueueItem',
166 'serialize' => self
::SERIALIZE_PHP
,
169 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
171 return Civi
::$statics[__CLASS__
]['fields'];
175 * Return a mapping from field-name to the corresponding key (as used in fields()).
178 * Array(string $name => string $uniqueName).
180 public static function &fieldKeys() {
181 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
182 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
184 return Civi
::$statics[__CLASS__
]['fieldKeys'];
188 * Returns the names of this table
192 public static function getTableName() {
193 return self
::$_tableName;
197 * Returns if this table needs to be logged
201 public function getLog() {
206 * Returns the list of fields that can be imported
208 * @param bool $prefix
212 public static function &import($prefix = FALSE) {
213 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'queue_item', $prefix, []);
218 * Returns the list of fields that can be exported
220 * @param bool $prefix
224 public static function &export($prefix = FALSE) {
225 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'queue_item', $prefix, []);
230 * Returns the list of indices
232 * @param bool $localize
236 public static function indices($localize = TRUE) {
238 'index_queueids' => [
239 'name' => 'index_queueids',
245 'localizable' => FALSE,
246 'sig' => 'civicrm_queue_item::0::queue_name::weight::id',
249 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;