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:3e1ec2353f61b542cca9c3c9efc73e80)
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 public static $_tableName = 'civicrm_prevnext_cache';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
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 localized title of this entity.
87 public static function getEntityTitle() {
88 return ts('Prev Next Caches');
92 * Returns all the column names of this table
96 public static function &fields() {
97 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
98 Civi
::$statics[__CLASS__
]['fields'] = [
101 'type' => CRM_Utils_Type
::T_INT
,
102 'title' => ts('Prev Next Cache ID'),
104 'where' => 'civicrm_prevnext_cache.id',
105 'table_name' => 'civicrm_prevnext_cache',
106 'entity' => 'PrevNextCache',
107 'bao' => 'CRM_Core_BAO_PrevNextCache',
112 'name' => 'entity_table',
113 'type' => CRM_Utils_Type
::T_STRING
,
114 'title' => ts('Prev Next Entity Table'),
115 'description' => ts('physical tablename for entity being joined to discount, e.g. civicrm_event'),
117 'size' => CRM_Utils_Type
::BIG
,
118 'where' => 'civicrm_prevnext_cache.entity_table',
119 'table_name' => 'civicrm_prevnext_cache',
120 'entity' => 'PrevNextCache',
121 'bao' => 'CRM_Core_BAO_PrevNextCache',
126 'name' => 'entity_id1',
127 'type' => CRM_Utils_Type
::T_INT
,
128 'title' => ts('Prev Next Entity ID 1'),
129 'description' => ts('FK to entity table specified in entity_table column.'),
131 'where' => 'civicrm_prevnext_cache.entity_id1',
132 'table_name' => 'civicrm_prevnext_cache',
133 'entity' => 'PrevNextCache',
134 'bao' => 'CRM_Core_BAO_PrevNextCache',
139 'name' => 'entity_id2',
140 'type' => CRM_Utils_Type
::T_INT
,
141 'title' => ts('Prev Next Entity ID 2'),
142 'description' => ts('FK to entity table specified in entity_table column.'),
144 'where' => 'civicrm_prevnext_cache.entity_id2',
145 'table_name' => 'civicrm_prevnext_cache',
146 'entity' => 'PrevNextCache',
147 'bao' => 'CRM_Core_BAO_PrevNextCache',
152 'name' => 'cachekey',
153 'type' => CRM_Utils_Type
::T_STRING
,
154 'title' => ts('Cache Key'),
155 'description' => ts('Unique path name for cache element of the searched item'),
157 'size' => CRM_Utils_Type
::HUGE
,
158 'where' => 'civicrm_prevnext_cache.cachekey',
159 'table_name' => 'civicrm_prevnext_cache',
160 'entity' => 'PrevNextCache',
161 'bao' => 'CRM_Core_BAO_PrevNextCache',
167 'type' => CRM_Utils_Type
::T_LONGTEXT
,
168 'title' => ts('Prev Next Data'),
169 'description' => ts('cached snapshot of the serialized data'),
170 'where' => 'civicrm_prevnext_cache.data',
171 'table_name' => 'civicrm_prevnext_cache',
172 'entity' => 'PrevNextCache',
173 'bao' => 'CRM_Core_BAO_PrevNextCache',
175 'serialize' => self
::SERIALIZE_PHP
,
179 'name' => 'is_selected',
180 'type' => CRM_Utils_Type
::T_BOOLEAN
,
181 'title' => ts('Is Selected'),
182 'where' => 'civicrm_prevnext_cache.is_selected',
184 'table_name' => 'civicrm_prevnext_cache',
185 'entity' => 'PrevNextCache',
186 'bao' => 'CRM_Core_BAO_PrevNextCache',
191 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
193 return Civi
::$statics[__CLASS__
]['fields'];
197 * Return a mapping from field-name to the corresponding key (as used in fields()).
200 * Array(string $name => string $uniqueName).
202 public static function &fieldKeys() {
203 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
204 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
206 return Civi
::$statics[__CLASS__
]['fieldKeys'];
210 * Returns the names of this table
214 public static function getTableName() {
215 return self
::$_tableName;
219 * Returns if this table needs to be logged
223 public function getLog() {
228 * Returns the list of fields that can be imported
230 * @param bool $prefix
234 public static function &import($prefix = FALSE) {
235 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'prevnext_cache', $prefix, []);
240 * Returns the list of fields that can be exported
242 * @param bool $prefix
246 public static function &export($prefix = FALSE) {
247 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'prevnext_cache', $prefix, []);
252 * Returns the list of indices
254 * @param bool $localize
258 public static function indices($localize = TRUE) {
261 'name' => 'index_all',
269 'localizable' => FALSE,
270 'sig' => 'civicrm_prevnext_cache::0::cachekey::entity_id1::entity_id2::entity_table::is_selected',
273 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;