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:4b3a1116045b1c18e6aa3288bbd07b49)
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',
104 'name' => 'queue_name',
105 'type' => CRM_Utils_Type
::T_STRING
,
106 'title' => ts('Queue Name'),
107 'description' => ts('Name of the queue which includes this item'),
110 'size' => CRM_Utils_Type
::BIG
,
111 'where' => 'civicrm_queue_item.queue_name',
112 'table_name' => 'civicrm_queue_item',
113 'entity' => 'QueueItem',
114 'bao' => 'CRM_Queue_BAO_QueueItem',
122 'type' => CRM_Utils_Type
::T_INT
,
123 'title' => ts('Order'),
125 'where' => 'civicrm_queue_item.weight',
126 'table_name' => 'civicrm_queue_item',
127 'entity' => 'QueueItem',
128 'bao' => 'CRM_Queue_BAO_QueueItem',
135 'name' => 'submit_time',
136 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
137 'title' => ts('Submit Time'),
138 'description' => ts('date on which this item was submitted to the queue'),
140 'where' => 'civicrm_queue_item.submit_time',
141 'table_name' => 'civicrm_queue_item',
142 'entity' => 'QueueItem',
143 'bao' => 'CRM_Queue_BAO_QueueItem',
146 'type' => 'Select Date',
150 'name' => 'release_time',
151 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
152 'title' => ts('Release Time'),
153 'description' => ts('date on which this job becomes available; null if ASAP'),
154 'where' => 'civicrm_queue_item.release_time',
155 'table_name' => 'civicrm_queue_item',
156 'entity' => 'QueueItem',
157 'bao' => 'CRM_Queue_BAO_QueueItem',
160 'type' => 'Select Date',
165 'type' => CRM_Utils_Type
::T_TEXT
,
166 'title' => ts('Queue item data'),
167 'description' => ts('Serialized queue data'),
168 'where' => 'civicrm_queue_item.data',
169 'table_name' => 'civicrm_queue_item',
170 'entity' => 'QueueItem',
171 'bao' => 'CRM_Queue_BAO_QueueItem',
173 'serialize' => self
::SERIALIZE_PHP
,
176 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
178 return Civi
::$statics[__CLASS__
]['fields'];
182 * Return a mapping from field-name to the corresponding key (as used in fields()).
185 * Array(string $name => string $uniqueName).
187 public static function &fieldKeys() {
188 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
189 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
191 return Civi
::$statics[__CLASS__
]['fieldKeys'];
195 * Returns the names of this table
199 public static function getTableName() {
200 return self
::$_tableName;
204 * Returns if this table needs to be logged
208 public function getLog() {
213 * Returns the list of fields that can be imported
215 * @param bool $prefix
219 public static function &import($prefix = FALSE) {
220 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'queue_item', $prefix, []);
225 * Returns the list of fields that can be exported
227 * @param bool $prefix
231 public static function &export($prefix = FALSE) {
232 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'queue_item', $prefix, []);
237 * Returns the list of indices
239 * @param bool $localize
243 public static function indices($localize = TRUE) {
245 'index_queueids' => [
246 'name' => 'index_queueids',
252 'localizable' => FALSE,
253 'sig' => 'civicrm_queue_item::0::queue_name::weight::id',
256 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;