3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/PrevNextCache.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:50673715dba67219734f6235bf18f0db)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_PrevNextCache
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_prevnext_cache';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
89 * physical tablename for entity being joined to discount, e.g. civicrm_event
95 * FK to entity table specified in entity_table column.
101 * FK to entity table specified in entity_table column.
107 * Unique path name for cache element of the searched item
113 * cached snapshot of the serialized data
126 * @return civicrm_prevnext_cache
128 function __construct() {
129 $this->__table
= 'civicrm_prevnext_cache';
130 parent
::__construct();
133 * Returns all the column names of this table
137 static function &fields() {
138 if (!(self
::$_fields)) {
139 self
::$_fields = array(
142 'type' => CRM_Utils_Type
::T_INT
,
143 'title' => ts('Prev Next Cache ID') ,
146 'entity_table' => array(
147 'name' => 'entity_table',
148 'type' => CRM_Utils_Type
::T_STRING
,
149 'title' => ts('Prev Next Entity Table') ,
150 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event',
152 'size' => CRM_Utils_Type
::BIG
,
154 'entity_id1' => array(
155 'name' => 'entity_id1',
156 'type' => CRM_Utils_Type
::T_INT
,
157 'title' => ts('Prev Next Entity ID 1') ,
158 'description' => 'FK to entity table specified in entity_table column.',
161 'entity_id2' => array(
162 'name' => 'entity_id2',
163 'type' => CRM_Utils_Type
::T_INT
,
164 'title' => ts('Prev Next Entity ID 2') ,
165 'description' => 'FK to entity table specified in entity_table column.',
169 'name' => 'cacheKey',
170 'type' => CRM_Utils_Type
::T_STRING
,
171 'title' => ts('Cache Key') ,
172 'description' => 'Unique path name for cache element of the searched item',
174 'size' => CRM_Utils_Type
::HUGE
,
178 'type' => CRM_Utils_Type
::T_LONGTEXT
,
179 'title' => ts('Prev Next Data') ,
180 'description' => 'cached snapshot of the serialized data',
182 'is_selected' => array(
183 'name' => 'is_selected',
184 'type' => CRM_Utils_Type
::T_BOOLEAN
,
185 'title' => ts('Is Selected') ,
189 return self
::$_fields;
192 * Returns an array containing, for each field, the arary key used for that
193 * field in self::$_fields.
197 static function &fieldKeys() {
198 if (!(self
::$_fieldKeys)) {
199 self
::$_fieldKeys = array(
201 'entity_table' => 'entity_table',
202 'entity_id1' => 'entity_id1',
203 'entity_id2' => 'entity_id2',
204 'cacheKey' => 'cacheKey',
206 'is_selected' => 'is_selected',
209 return self
::$_fieldKeys;
212 * Returns the names of this table
216 static function getTableName() {
217 return self
::$_tableName;
220 * Returns if this table needs to be logged
228 * Returns the list of fields that can be imported
230 * @param bool $prefix
234 static function &import($prefix = false) {
235 if (!(self
::$_import)) {
236 self
::$_import = array();
237 $fields = self
::fields();
238 foreach($fields as $name => $field) {
239 if (CRM_Utils_Array
::value('import', $field)) {
241 self
::$_import['prevnext_cache'] = & $fields[$name];
243 self
::$_import[$name] = & $fields[$name];
248 return self
::$_import;
251 * Returns the list of fields that can be exported
253 * @param bool $prefix
257 static function &export($prefix = false) {
258 if (!(self
::$_export)) {
259 self
::$_export = array();
260 $fields = self
::fields();
261 foreach($fields as $name => $field) {
262 if (CRM_Utils_Array
::value('export', $field)) {
264 self
::$_export['prevnext_cache'] = & $fields[$name];
266 self
::$_export[$name] = & $fields[$name];
271 return self
::$_export;