3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Core/PrevNextCache.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:edf9dd4b38ca08a34dbc6990ac954af2)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_PrevNextCache constructor.
40 class CRM_Core_DAO_PrevNextCache
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_prevnext_cache';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * physical tablename for entity being joined to discount, e.g. civicrm_event
65 * FK to entity table specified in entity_table column.
71 * FK to entity table specified in entity_table column.
77 * Unique path name for cache element of the searched item
83 * cached snapshot of the serialized data
96 function __construct() {
97 $this->__table
= 'civicrm_prevnext_cache';
98 parent
::__construct();
101 * Returns all the column names of this table
105 static function &fields() {
106 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
107 Civi
::$statics[__CLASS__
]['fields'] = array(
110 'type' => CRM_Utils_Type
::T_INT
,
111 'title' => ts('Prev Next Cache ID') ,
113 'table_name' => 'civicrm_prevnext_cache',
114 'entity' => 'PrevNextCache',
115 'bao' => 'CRM_Core_BAO_PrevNextCache',
118 'entity_table' => array(
119 'name' => 'entity_table',
120 'type' => CRM_Utils_Type
::T_STRING
,
121 'title' => ts('Prev Next Entity Table') ,
122 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event',
124 'size' => CRM_Utils_Type
::BIG
,
125 'table_name' => 'civicrm_prevnext_cache',
126 'entity' => 'PrevNextCache',
127 'bao' => 'CRM_Core_BAO_PrevNextCache',
130 'entity_id1' => array(
131 'name' => 'entity_id1',
132 'type' => CRM_Utils_Type
::T_INT
,
133 'title' => ts('Prev Next Entity ID 1') ,
134 'description' => 'FK to entity table specified in entity_table column.',
136 'table_name' => 'civicrm_prevnext_cache',
137 'entity' => 'PrevNextCache',
138 'bao' => 'CRM_Core_BAO_PrevNextCache',
141 'entity_id2' => array(
142 'name' => 'entity_id2',
143 'type' => CRM_Utils_Type
::T_INT
,
144 'title' => ts('Prev Next Entity ID 2') ,
145 'description' => 'FK to entity table specified in entity_table column.',
147 'table_name' => 'civicrm_prevnext_cache',
148 'entity' => 'PrevNextCache',
149 'bao' => 'CRM_Core_BAO_PrevNextCache',
153 'name' => 'cacheKey',
154 'type' => CRM_Utils_Type
::T_STRING
,
155 'title' => ts('Cache Key') ,
156 'description' => 'Unique path name for cache element of the searched item',
158 'size' => CRM_Utils_Type
::HUGE
,
159 'table_name' => 'civicrm_prevnext_cache',
160 'entity' => 'PrevNextCache',
161 'bao' => 'CRM_Core_BAO_PrevNextCache',
166 'type' => CRM_Utils_Type
::T_LONGTEXT
,
167 'title' => ts('Prev Next Data') ,
168 'description' => 'cached snapshot of the serialized data',
169 'table_name' => 'civicrm_prevnext_cache',
170 'entity' => 'PrevNextCache',
171 'bao' => 'CRM_Core_BAO_PrevNextCache',
174 'is_selected' => array(
175 'name' => 'is_selected',
176 'type' => CRM_Utils_Type
::T_BOOLEAN
,
177 'title' => ts('Is Selected') ,
178 'table_name' => 'civicrm_prevnext_cache',
179 'entity' => 'PrevNextCache',
180 'bao' => 'CRM_Core_BAO_PrevNextCache',
184 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
186 return Civi
::$statics[__CLASS__
]['fields'];
189 * Return a mapping from field-name to the corresponding key (as used in fields()).
192 * Array(string $name => string $uniqueName).
194 static function &fieldKeys() {
195 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
196 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
198 return Civi
::$statics[__CLASS__
]['fieldKeys'];
201 * Returns the names of this table
205 static function getTableName() {
206 return self
::$_tableName;
209 * Returns if this table needs to be logged
217 * Returns the list of fields that can be imported
219 * @param bool $prefix
223 static function &import($prefix = false) {
224 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'prevnext_cache', $prefix, array());
228 * Returns the list of fields that can be exported
230 * @param bool $prefix
234 static function &export($prefix = false) {
235 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'prevnext_cache', $prefix, array());
239 * Returns the list of indices
241 public static function indices($localize = TRUE) {
243 'index_all' => array(
244 'name' => 'index_all',
252 'localizable' => false,
253 'sig' => 'civicrm_prevnext_cache::0::cacheKey::entity_id1::entity_id2::entity_table::is_selected',
256 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;