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:af3cb54c291525d39547cefa9bddf11a)
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.
90 * Whether to return the plural version of the title.
92 public static function getEntityTitle($plural = FALSE) {
93 return $plural ?
ts('Prev Next Caches') : ts('Prev Next Cache');
97 * Returns all the column names of this table
101 public static function &fields() {
102 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
103 Civi
::$statics[__CLASS__
]['fields'] = [
106 'type' => CRM_Utils_Type
::T_INT
,
107 'title' => ts('Prev Next Cache ID'),
109 'where' => 'civicrm_prevnext_cache.id',
110 'table_name' => 'civicrm_prevnext_cache',
111 'entity' => 'PrevNextCache',
112 'bao' => 'CRM_Core_BAO_PrevNextCache',
121 'name' => 'entity_table',
122 'type' => CRM_Utils_Type
::T_STRING
,
123 'title' => ts('Prev Next Entity Table'),
124 'description' => ts('physical tablename for entity being joined to discount, e.g. civicrm_event'),
126 'size' => CRM_Utils_Type
::BIG
,
127 'where' => 'civicrm_prevnext_cache.entity_table',
128 'table_name' => 'civicrm_prevnext_cache',
129 'entity' => 'PrevNextCache',
130 'bao' => 'CRM_Core_BAO_PrevNextCache',
135 'name' => 'entity_id1',
136 'type' => CRM_Utils_Type
::T_INT
,
137 'title' => ts('Prev Next Entity ID 1'),
138 'description' => ts('FK to entity table specified in entity_table column.'),
140 'where' => 'civicrm_prevnext_cache.entity_id1',
141 'table_name' => 'civicrm_prevnext_cache',
142 'entity' => 'PrevNextCache',
143 'bao' => 'CRM_Core_BAO_PrevNextCache',
148 'name' => 'entity_id2',
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('Prev Next Entity ID 2'),
151 'description' => ts('FK to entity table specified in entity_table column.'),
153 'where' => 'civicrm_prevnext_cache.entity_id2',
154 'table_name' => 'civicrm_prevnext_cache',
155 'entity' => 'PrevNextCache',
156 'bao' => 'CRM_Core_BAO_PrevNextCache',
161 'name' => 'cachekey',
162 'type' => CRM_Utils_Type
::T_STRING
,
163 'title' => ts('Cache Key'),
164 'description' => ts('Unique path name for cache element of the searched item'),
166 'size' => CRM_Utils_Type
::HUGE
,
167 'where' => 'civicrm_prevnext_cache.cachekey',
168 'table_name' => 'civicrm_prevnext_cache',
169 'entity' => 'PrevNextCache',
170 'bao' => 'CRM_Core_BAO_PrevNextCache',
176 'type' => CRM_Utils_Type
::T_LONGTEXT
,
177 'title' => ts('Prev Next Data'),
178 'description' => ts('cached snapshot of the serialized data'),
179 'where' => 'civicrm_prevnext_cache.data',
180 'table_name' => 'civicrm_prevnext_cache',
181 'entity' => 'PrevNextCache',
182 'bao' => 'CRM_Core_BAO_PrevNextCache',
184 'serialize' => self
::SERIALIZE_PHP
,
188 'name' => 'is_selected',
189 'type' => CRM_Utils_Type
::T_BOOLEAN
,
190 'title' => ts('Is Selected'),
191 'where' => 'civicrm_prevnext_cache.is_selected',
193 'table_name' => 'civicrm_prevnext_cache',
194 'entity' => 'PrevNextCache',
195 'bao' => 'CRM_Core_BAO_PrevNextCache',
200 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
202 return Civi
::$statics[__CLASS__
]['fields'];
206 * Return a mapping from field-name to the corresponding key (as used in fields()).
209 * Array(string $name => string $uniqueName).
211 public static function &fieldKeys() {
212 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
213 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
215 return Civi
::$statics[__CLASS__
]['fieldKeys'];
219 * Returns the names of this table
223 public static function getTableName() {
224 return self
::$_tableName;
228 * Returns if this table needs to be logged
232 public function getLog() {
237 * Returns the list of fields that can be imported
239 * @param bool $prefix
243 public static function &import($prefix = FALSE) {
244 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'prevnext_cache', $prefix, []);
249 * Returns the list of fields that can be exported
251 * @param bool $prefix
255 public static function &export($prefix = FALSE) {
256 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'prevnext_cache', $prefix, []);
261 * Returns the list of indices
263 * @param bool $localize
267 public static function indices($localize = TRUE) {
270 'name' => 'index_all',
278 'localizable' => FALSE,
279 'sig' => 'civicrm_prevnext_cache::0::cachekey::entity_id1::entity_id2::entity_table::is_selected',
282 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;