5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/PrevNextCache.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:ec5d04442cf8976a3163cabeb3ba433c)
13 * Database access object for the PrevNextCache entity.
15 class CRM_Core_DAO_PrevNextCache
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 static $_tableName = 'civicrm_prevnext_cache';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
37 * physical tablename for entity being joined to discount, e.g. civicrm_event
44 * FK to entity table specified in entity_table column.
51 * FK to entity table specified in entity_table column.
58 * Unique path name for cache element of the searched item
65 * cached snapshot of the serialized data
79 public function __construct() {
80 $this->__table
= 'civicrm_prevnext_cache';
81 parent
::__construct();
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('Prev Next Cache ID'),
97 'table_name' => 'civicrm_prevnext_cache',
98 'entity' => 'PrevNextCache',
99 'bao' => 'CRM_Core_BAO_PrevNextCache',
103 'name' => 'entity_table',
104 'type' => CRM_Utils_Type
::T_STRING
,
105 'title' => ts('Prev Next Entity Table'),
106 'description' => ts('physical tablename for entity being joined to discount, e.g. civicrm_event'),
108 'size' => CRM_Utils_Type
::BIG
,
109 'table_name' => 'civicrm_prevnext_cache',
110 'entity' => 'PrevNextCache',
111 'bao' => 'CRM_Core_BAO_PrevNextCache',
115 'name' => 'entity_id1',
116 'type' => CRM_Utils_Type
::T_INT
,
117 'title' => ts('Prev Next Entity ID 1'),
118 'description' => ts('FK to entity table specified in entity_table column.'),
120 'table_name' => 'civicrm_prevnext_cache',
121 'entity' => 'PrevNextCache',
122 'bao' => 'CRM_Core_BAO_PrevNextCache',
126 'name' => 'entity_id2',
127 'type' => CRM_Utils_Type
::T_INT
,
128 'title' => ts('Prev Next Entity ID 2'),
129 'description' => ts('FK to entity table specified in entity_table column.'),
131 'table_name' => 'civicrm_prevnext_cache',
132 'entity' => 'PrevNextCache',
133 'bao' => 'CRM_Core_BAO_PrevNextCache',
137 'name' => 'cacheKey',
138 'type' => CRM_Utils_Type
::T_STRING
,
139 'title' => ts('Cache Key'),
140 'description' => ts('Unique path name for cache element of the searched item'),
142 'size' => CRM_Utils_Type
::HUGE
,
143 'table_name' => 'civicrm_prevnext_cache',
144 'entity' => 'PrevNextCache',
145 'bao' => 'CRM_Core_BAO_PrevNextCache',
150 'type' => CRM_Utils_Type
::T_LONGTEXT
,
151 'title' => ts('Prev Next Data'),
152 'description' => ts('cached snapshot of the serialized data'),
153 'table_name' => 'civicrm_prevnext_cache',
154 'entity' => 'PrevNextCache',
155 'bao' => 'CRM_Core_BAO_PrevNextCache',
157 'serialize' => self
::SERIALIZE_PHP
,
160 'name' => 'is_selected',
161 'type' => CRM_Utils_Type
::T_BOOLEAN
,
162 'title' => ts('Is Selected'),
164 'table_name' => 'civicrm_prevnext_cache',
165 'entity' => 'PrevNextCache',
166 'bao' => 'CRM_Core_BAO_PrevNextCache',
170 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
172 return Civi
::$statics[__CLASS__
]['fields'];
176 * Return a mapping from field-name to the corresponding key (as used in fields()).
179 * Array(string $name => string $uniqueName).
181 public static function &fieldKeys() {
182 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
183 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
185 return Civi
::$statics[__CLASS__
]['fieldKeys'];
189 * Returns the names of this table
193 public static function getTableName() {
194 return self
::$_tableName;
198 * Returns if this table needs to be logged
202 public function getLog() {
207 * Returns the list of fields that can be imported
209 * @param bool $prefix
213 public static function &import($prefix = FALSE) {
214 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'prevnext_cache', $prefix, []);
219 * Returns the list of fields that can be exported
221 * @param bool $prefix
225 public static function &export($prefix = FALSE) {
226 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'prevnext_cache', $prefix, []);
231 * Returns the list of indices
233 * @param bool $localize
237 public static function indices($localize = TRUE) {
240 'name' => 'index_all',
248 'localizable' => FALSE,
249 'sig' => 'civicrm_prevnext_cache::0::cacheKey::entity_id1::entity_id2::entity_table::is_selected',
252 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;