Commit | Line | Data |
---|---|---|
e501603b TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
4 | | CiviCRM version 4.7 | | |
5 | +--------------------------------------------------------------------+ | |
6 | | Copyright CiviCRM LLC (c) 2004-2016 | | |
7 | +--------------------------------------------------------------------+ | |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
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. | | |
13 | | | | |
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. | | |
18 | | | | |
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 | +--------------------------------------------------------------------+ | |
26 | */ | |
27 | /** | |
28 | * @package CRM | |
29 | * @copyright CiviCRM LLC (c) 2004-2016 | |
30 | * | |
31 | * Generated from xml/schema/CRM/Core/PrevNextCache.xml | |
32 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
437fafcf | 33 | * (GenCodeChecksum:50673715dba67219734f6235bf18f0db) |
e501603b TO |
34 | */ |
35 | require_once 'CRM/Core/DAO.php'; | |
36 | require_once 'CRM/Utils/Type.php'; | |
37 | class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO { | |
38 | /** | |
39 | * static instance to hold the table name | |
40 | * | |
41 | * @var string | |
42 | */ | |
43 | static $_tableName = 'civicrm_prevnext_cache'; | |
e501603b TO |
44 | /** |
45 | * static value to see if we should log any modifications to | |
46 | * this table in the civicrm_log table | |
47 | * | |
48 | * @var boolean | |
49 | */ | |
50 | static $_log = false; | |
51 | /** | |
52 | * | |
53 | * @var int unsigned | |
54 | */ | |
55 | public $id; | |
56 | /** | |
57 | * physical tablename for entity being joined to discount, e.g. civicrm_event | |
58 | * | |
59 | * @var string | |
60 | */ | |
61 | public $entity_table; | |
62 | /** | |
63 | * FK to entity table specified in entity_table column. | |
64 | * | |
65 | * @var int unsigned | |
66 | */ | |
67 | public $entity_id1; | |
68 | /** | |
69 | * FK to entity table specified in entity_table column. | |
70 | * | |
71 | * @var int unsigned | |
72 | */ | |
73 | public $entity_id2; | |
74 | /** | |
75 | * Unique path name for cache element of the searched item | |
76 | * | |
77 | * @var string | |
78 | */ | |
79 | public $cacheKey; | |
80 | /** | |
81 | * cached snapshot of the serialized data | |
82 | * | |
83 | * @var longtext | |
84 | */ | |
85 | public $data; | |
86 | /** | |
87 | * | |
88 | * @var boolean | |
89 | */ | |
90 | public $is_selected; | |
91 | /** | |
92 | * class constructor | |
93 | * | |
94 | * @return civicrm_prevnext_cache | |
95 | */ | |
96 | function __construct() { | |
97 | $this->__table = 'civicrm_prevnext_cache'; | |
98 | parent::__construct(); | |
99 | } | |
100 | /** | |
101 | * Returns all the column names of this table | |
102 | * | |
103 | * @return array | |
104 | */ | |
105 | static function &fields() { | |
346aaaba TO |
106 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
107 | Civi::$statics[__CLASS__]['fields'] = array( | |
e501603b TO |
108 | 'id' => array( |
109 | 'name' => 'id', | |
110 | 'type' => CRM_Utils_Type::T_INT, | |
111 | 'title' => ts('Prev Next Cache ID') , | |
112 | 'required' => true, | |
113 | ) , | |
114 | 'entity_table' => array( | |
115 | 'name' => 'entity_table', | |
116 | 'type' => CRM_Utils_Type::T_STRING, | |
117 | 'title' => ts('Prev Next Entity Table') , | |
118 | 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event', | |
119 | 'maxlength' => 64, | |
120 | 'size' => CRM_Utils_Type::BIG, | |
121 | ) , | |
122 | 'entity_id1' => array( | |
123 | 'name' => 'entity_id1', | |
124 | 'type' => CRM_Utils_Type::T_INT, | |
125 | 'title' => ts('Prev Next Entity ID 1') , | |
126 | 'description' => 'FK to entity table specified in entity_table column.', | |
127 | 'required' => true, | |
128 | ) , | |
129 | 'entity_id2' => array( | |
130 | 'name' => 'entity_id2', | |
131 | 'type' => CRM_Utils_Type::T_INT, | |
132 | 'title' => ts('Prev Next Entity ID 2') , | |
133 | 'description' => 'FK to entity table specified in entity_table column.', | |
134 | 'required' => true, | |
135 | ) , | |
136 | 'cacheKey' => array( | |
137 | 'name' => 'cacheKey', | |
138 | 'type' => CRM_Utils_Type::T_STRING, | |
139 | 'title' => ts('Cache Key') , | |
140 | 'description' => 'Unique path name for cache element of the searched item', | |
141 | 'maxlength' => 255, | |
142 | 'size' => CRM_Utils_Type::HUGE, | |
143 | ) , | |
144 | 'data' => array( | |
145 | 'name' => 'data', | |
146 | 'type' => CRM_Utils_Type::T_LONGTEXT, | |
147 | 'title' => ts('Prev Next Data') , | |
148 | 'description' => 'cached snapshot of the serialized data', | |
149 | ) , | |
150 | 'is_selected' => array( | |
151 | 'name' => 'is_selected', | |
152 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
153 | 'title' => ts('Is Selected') , | |
154 | ) , | |
155 | ); | |
346aaaba | 156 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 157 | } |
346aaaba | 158 | return Civi::$statics[__CLASS__]['fields']; |
e501603b TO |
159 | } |
160 | /** | |
bd8e0b14 | 161 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
162 | * |
163 | * @return array | |
bd8e0b14 | 164 | * Array(string $name => string $uniqueName). |
e501603b TO |
165 | */ |
166 | static function &fieldKeys() { | |
bd8e0b14 TO |
167 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
168 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 169 | } |
bd8e0b14 | 170 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b TO |
171 | } |
172 | /** | |
173 | * Returns the names of this table | |
174 | * | |
175 | * @return string | |
176 | */ | |
177 | static function getTableName() { | |
178 | return self::$_tableName; | |
179 | } | |
180 | /** | |
181 | * Returns if this table needs to be logged | |
182 | * | |
183 | * @return boolean | |
184 | */ | |
185 | function getLog() { | |
186 | return self::$_log; | |
187 | } | |
188 | /** | |
189 | * Returns the list of fields that can be imported | |
190 | * | |
191 | * @param bool $prefix | |
192 | * | |
193 | * @return array | |
194 | */ | |
195 | static function &import($prefix = false) { | |
60808919 TO |
196 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'prevnext_cache', $prefix, array()); |
197 | return $r; | |
e501603b TO |
198 | } |
199 | /** | |
200 | * Returns the list of fields that can be exported | |
201 | * | |
202 | * @param bool $prefix | |
203 | * | |
204 | * @return array | |
205 | */ | |
206 | static function &export($prefix = false) { | |
60808919 TO |
207 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'prevnext_cache', $prefix, array()); |
208 | return $r; | |
e501603b TO |
209 | } |
210 | } |