5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Queue/QueueItem.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:9049b4828c213985dea2180555f28568)
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 static $_tableName = 'civicrm_queue_item';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 'table_name' => 'civicrm_queue_item',
91 'entity' => 'QueueItem',
92 'bao' => 'CRM_Queue_BAO_QueueItem',
96 'name' => 'queue_name',
97 'type' => CRM_Utils_Type
::T_STRING
,
98 'title' => ts('Queue Name'),
99 'description' => 'Name of the queue which includes this item',
102 'size' => CRM_Utils_Type
::BIG
,
103 'table_name' => 'civicrm_queue_item',
104 'entity' => 'QueueItem',
105 'bao' => 'CRM_Queue_BAO_QueueItem',
113 'type' => CRM_Utils_Type
::T_INT
,
114 'title' => ts('Order'),
116 'table_name' => 'civicrm_queue_item',
117 'entity' => 'QueueItem',
118 'bao' => 'CRM_Queue_BAO_QueueItem',
125 'name' => 'submit_time',
126 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
127 'title' => ts('Submit Time'),
128 'description' => 'date on which this item was submitted to the queue',
130 'table_name' => 'civicrm_queue_item',
131 'entity' => 'QueueItem',
132 'bao' => 'CRM_Queue_BAO_QueueItem',
135 'type' => 'Select Date',
139 'name' => 'release_time',
140 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
141 'title' => ts('Release Time'),
142 'description' => 'date on which this job becomes available; null if ASAP',
143 'table_name' => 'civicrm_queue_item',
144 'entity' => 'QueueItem',
145 'bao' => 'CRM_Queue_BAO_QueueItem',
148 'type' => 'Select Date',
153 'type' => CRM_Utils_Type
::T_TEXT
,
154 'title' => ts('Queue item data'),
155 'description' => 'Serialized queue data',
156 'table_name' => 'civicrm_queue_item',
157 'entity' => 'QueueItem',
158 'bao' => 'CRM_Queue_BAO_QueueItem',
160 'serialize' => self
::SERIALIZE_PHP
,
163 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
165 return Civi
::$statics[__CLASS__
]['fields'];
169 * Return a mapping from field-name to the corresponding key (as used in fields()).
172 * Array(string $name => string $uniqueName).
174 public static function &fieldKeys() {
175 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
176 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
178 return Civi
::$statics[__CLASS__
]['fieldKeys'];
182 * Returns the names of this table
186 public static function getTableName() {
187 return self
::$_tableName;
191 * Returns if this table needs to be logged
195 public function getLog() {
200 * Returns the list of fields that can be imported
202 * @param bool $prefix
206 public static function &import($prefix = FALSE) {
207 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'queue_item', $prefix, []);
212 * Returns the list of fields that can be exported
214 * @param bool $prefix
218 public static function &export($prefix = FALSE) {
219 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'queue_item', $prefix, []);
224 * Returns the list of indices
226 * @param bool $localize
230 public static function indices($localize = TRUE) {
232 'index_queueids' => [
233 'name' => 'index_queueids',
239 'localizable' => FALSE,
240 'sig' => 'civicrm_queue_item::0::queue_name::weight::id',
243 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;