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:137a0dea273fd4cad666fc1091fc8c84)
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 localized title of this entity.
80 public static function getEntityTitle() {
81 return ts('Queue Items');
85 * Returns all the column names of this table
89 public static function &fields() {
90 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
91 Civi
::$statics[__CLASS__
]['fields'] = [
94 'type' => CRM_Utils_Type
::T_INT
,
95 'title' => ts('Queue ID'),
97 'where' => 'civicrm_queue_item.id',
98 'table_name' => 'civicrm_queue_item',
99 'entity' => 'QueueItem',
100 'bao' => 'CRM_Queue_BAO_QueueItem',
105 'name' => 'queue_name',
106 'type' => CRM_Utils_Type
::T_STRING
,
107 'title' => ts('Queue Name'),
108 'description' => ts('Name of the queue which includes this item'),
111 'size' => CRM_Utils_Type
::BIG
,
112 'where' => 'civicrm_queue_item.queue_name',
113 'table_name' => 'civicrm_queue_item',
114 'entity' => 'QueueItem',
115 'bao' => 'CRM_Queue_BAO_QueueItem',
124 'type' => CRM_Utils_Type
::T_INT
,
125 'title' => ts('Order'),
127 'where' => 'civicrm_queue_item.weight',
128 'table_name' => 'civicrm_queue_item',
129 'entity' => 'QueueItem',
130 'bao' => 'CRM_Queue_BAO_QueueItem',
138 'name' => 'submit_time',
139 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
140 'title' => ts('Submit Time'),
141 'description' => ts('date on which this item was submitted to the queue'),
143 'where' => 'civicrm_queue_item.submit_time',
144 'table_name' => 'civicrm_queue_item',
145 'entity' => 'QueueItem',
146 'bao' => 'CRM_Queue_BAO_QueueItem',
149 'type' => 'Select Date',
154 'name' => 'release_time',
155 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
156 'title' => ts('Release Time'),
157 'description' => ts('date on which this job becomes available; null if ASAP'),
158 'where' => 'civicrm_queue_item.release_time',
159 'table_name' => 'civicrm_queue_item',
160 'entity' => 'QueueItem',
161 'bao' => 'CRM_Queue_BAO_QueueItem',
164 'type' => 'Select Date',
170 'type' => CRM_Utils_Type
::T_TEXT
,
171 'title' => ts('Queue item data'),
172 'description' => ts('Serialized queue data'),
173 'where' => 'civicrm_queue_item.data',
174 'table_name' => 'civicrm_queue_item',
175 'entity' => 'QueueItem',
176 'bao' => 'CRM_Queue_BAO_QueueItem',
178 'serialize' => self
::SERIALIZE_PHP
,
182 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
184 return Civi
::$statics[__CLASS__
]['fields'];
188 * Return a mapping from field-name to the corresponding key (as used in fields()).
191 * Array(string $name => string $uniqueName).
193 public static function &fieldKeys() {
194 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
195 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
197 return Civi
::$statics[__CLASS__
]['fieldKeys'];
201 * Returns the names of this table
205 public static function getTableName() {
206 return self
::$_tableName;
210 * Returns if this table needs to be logged
214 public function getLog() {
219 * Returns the list of fields that can be imported
221 * @param bool $prefix
225 public static function &import($prefix = FALSE) {
226 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'queue_item', $prefix, []);
231 * Returns the list of fields that can be exported
233 * @param bool $prefix
237 public static function &export($prefix = FALSE) {
238 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'queue_item', $prefix, []);
243 * Returns the list of indices
245 * @param bool $localize
249 public static function indices($localize = TRUE) {
251 'index_queueids' => [
252 'name' => 'index_queueids',
258 'localizable' => FALSE,
259 'sig' => 'civicrm_queue_item::0::queue_name::weight::id',
262 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;