5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/PrevNextCache.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:8086ffe55554b0fba698136fd6dee894)
13 * Database access object for the PrevNextCache entity.
15 class CRM_Core_DAO_PrevNextCache
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '3.4';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_prevnext_cache';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = FALSE;
39 * physical tablename for entity being joined to discount, e.g. civicrm_event
46 * FK to entity table specified in entity_table column.
53 * FK to entity table specified in entity_table column.
60 * Unique path name for cache element of the searched item
67 * cached snapshot of the serialized data
81 public function __construct() {
82 $this->__table
= 'civicrm_prevnext_cache';
83 parent
::__construct();
87 * Returns localized title of this entity.
89 public static function getEntityTitle() {
90 return ts('Prev Next Caches');
94 * Returns all the column names of this table
98 public static function &fields() {
99 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
100 Civi
::$statics[__CLASS__
]['fields'] = [
103 'type' => CRM_Utils_Type
::T_INT
,
104 'title' => ts('Prev Next Cache ID'),
106 'where' => 'civicrm_prevnext_cache.id',
107 'table_name' => 'civicrm_prevnext_cache',
108 'entity' => 'PrevNextCache',
109 'bao' => 'CRM_Core_BAO_PrevNextCache',
114 'name' => 'entity_table',
115 'type' => CRM_Utils_Type
::T_STRING
,
116 'title' => ts('Prev Next Entity Table'),
117 'description' => ts('physical tablename for entity being joined to discount, e.g. civicrm_event'),
119 'size' => CRM_Utils_Type
::BIG
,
120 'where' => 'civicrm_prevnext_cache.entity_table',
121 'table_name' => 'civicrm_prevnext_cache',
122 'entity' => 'PrevNextCache',
123 'bao' => 'CRM_Core_BAO_PrevNextCache',
128 'name' => 'entity_id1',
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('Prev Next Entity ID 1'),
131 'description' => ts('FK to entity table specified in entity_table column.'),
133 'where' => 'civicrm_prevnext_cache.entity_id1',
134 'table_name' => 'civicrm_prevnext_cache',
135 'entity' => 'PrevNextCache',
136 'bao' => 'CRM_Core_BAO_PrevNextCache',
141 'name' => 'entity_id2',
142 'type' => CRM_Utils_Type
::T_INT
,
143 'title' => ts('Prev Next Entity ID 2'),
144 'description' => ts('FK to entity table specified in entity_table column.'),
146 'where' => 'civicrm_prevnext_cache.entity_id2',
147 'table_name' => 'civicrm_prevnext_cache',
148 'entity' => 'PrevNextCache',
149 'bao' => 'CRM_Core_BAO_PrevNextCache',
154 'name' => 'cachekey',
155 'type' => CRM_Utils_Type
::T_STRING
,
156 'title' => ts('Cache Key'),
157 'description' => ts('Unique path name for cache element of the searched item'),
159 'size' => CRM_Utils_Type
::HUGE
,
160 'where' => 'civicrm_prevnext_cache.cachekey',
161 'table_name' => 'civicrm_prevnext_cache',
162 'entity' => 'PrevNextCache',
163 'bao' => 'CRM_Core_BAO_PrevNextCache',
169 'type' => CRM_Utils_Type
::T_LONGTEXT
,
170 'title' => ts('Prev Next Data'),
171 'description' => ts('cached snapshot of the serialized data'),
172 'where' => 'civicrm_prevnext_cache.data',
173 'table_name' => 'civicrm_prevnext_cache',
174 'entity' => 'PrevNextCache',
175 'bao' => 'CRM_Core_BAO_PrevNextCache',
177 'serialize' => self
::SERIALIZE_PHP
,
181 'name' => 'is_selected',
182 'type' => CRM_Utils_Type
::T_BOOLEAN
,
183 'title' => ts('Is Selected'),
184 'where' => 'civicrm_prevnext_cache.is_selected',
186 'table_name' => 'civicrm_prevnext_cache',
187 'entity' => 'PrevNextCache',
188 'bao' => 'CRM_Core_BAO_PrevNextCache',
193 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
195 return Civi
::$statics[__CLASS__
]['fields'];
199 * Return a mapping from field-name to the corresponding key (as used in fields()).
202 * Array(string $name => string $uniqueName).
204 public static function &fieldKeys() {
205 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
206 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
208 return Civi
::$statics[__CLASS__
]['fieldKeys'];
212 * Returns the names of this table
216 public static function getTableName() {
217 return self
::$_tableName;
221 * Returns if this table needs to be logged
225 public function getLog() {
230 * Returns the list of fields that can be imported
232 * @param bool $prefix
236 public static function &import($prefix = FALSE) {
237 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'prevnext_cache', $prefix, []);
242 * Returns the list of fields that can be exported
244 * @param bool $prefix
248 public static function &export($prefix = FALSE) {
249 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'prevnext_cache', $prefix, []);
254 * Returns the list of indices
256 * @param bool $localize
260 public static function indices($localize = TRUE) {
263 'name' => 'index_all',
271 'localizable' => FALSE,
272 'sig' => 'civicrm_prevnext_cache::0::cachekey::entity_id1::entity_id2::entity_table::is_selected',
275 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;