fixup CRM-14885 - Import DAOs
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
CommitLineData
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/ActionMapping.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
437fafcf 33 * (GenCodeChecksum:cf61768a3400766af641f4d6e9f6cba8)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
37class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
38 /**
39 * static instance to hold the table name
40 *
41 * @var string
42 */
43 static $_tableName = 'civicrm_action_mapping';
44 /**
45 * static instance to hold the field values
46 *
47 * @var array
48 */
49 static $_fields = null;
50 /**
51 * static instance to hold the keys used in $_fields for each field.
52 *
53 * @var array
54 */
55 static $_fieldKeys = null;
56 /**
57 * static instance to hold the FK relationships
58 *
59 * @var string
60 */
61 static $_links = null;
62 /**
63 * static instance to hold the values that can
64 * be imported
65 *
66 * @var array
67 */
68 static $_import = null;
69 /**
70 * static instance to hold the values that can
71 * be exported
72 *
73 * @var array
74 */
75 static $_export = null;
76 /**
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
79 *
80 * @var boolean
81 */
82 static $_log = false;
83 /**
84 *
85 * @var int unsigned
86 */
87 public $id;
88 /**
89 * Entity for which the reminder is created
90 *
91 * @var string
92 */
93 public $entity;
94 /**
95 * Entity value
96 *
97 * @var string
98 */
99 public $entity_value;
100 /**
101 * Entity value label
102 *
103 * @var string
104 */
105 public $entity_value_label;
106 /**
107 * Entity status
108 *
109 * @var string
110 */
111 public $entity_status;
112 /**
113 * Entity status label
114 *
115 * @var string
116 */
117 public $entity_status_label;
118 /**
119 * Entity date
120 *
121 * @var string
122 */
123 public $entity_date_start;
124 /**
125 * Entity date
126 *
127 * @var string
128 */
129 public $entity_date_end;
130 /**
131 * Entity recipient
132 *
133 * @var string
134 */
135 public $entity_recipient;
136 /**
137 * class constructor
138 *
139 * @return civicrm_action_mapping
140 */
141 function __construct() {
142 $this->__table = 'civicrm_action_mapping';
143 parent::__construct();
144 }
145 /**
146 * Returns all the column names of this table
147 *
148 * @return array
149 */
150 static function &fields() {
151 if (!(self::$_fields)) {
152 self::$_fields = array(
153 'id' => array(
154 'name' => 'id',
155 'type' => CRM_Utils_Type::T_INT,
156 'title' => ts('Action Mapping ID') ,
157 'required' => true,
158 ) ,
159 'entity' => array(
160 'name' => 'entity',
161 'type' => CRM_Utils_Type::T_STRING,
162 'title' => ts('Action Mapping Entity') ,
163 'description' => 'Entity for which the reminder is created',
164 'maxlength' => 64,
165 'size' => CRM_Utils_Type::BIG,
166 ) ,
167 'entity_value' => array(
168 'name' => 'entity_value',
169 'type' => CRM_Utils_Type::T_STRING,
170 'title' => ts('Action Mapping Entity Value') ,
171 'description' => 'Entity value',
172 'maxlength' => 64,
173 'size' => CRM_Utils_Type::BIG,
174 ) ,
175 'entity_value_label' => array(
176 'name' => 'entity_value_label',
177 'type' => CRM_Utils_Type::T_STRING,
178 'title' => ts('Value Label') ,
179 'description' => 'Entity value label',
180 'maxlength' => 64,
181 'size' => CRM_Utils_Type::BIG,
182 ) ,
183 'entity_status' => array(
184 'name' => 'entity_status',
185 'type' => CRM_Utils_Type::T_STRING,
186 'title' => ts('Status') ,
187 'description' => 'Entity status',
188 'maxlength' => 64,
189 'size' => CRM_Utils_Type::BIG,
190 ) ,
191 'entity_status_label' => array(
192 'name' => 'entity_status_label',
193 'type' => CRM_Utils_Type::T_STRING,
194 'title' => ts('Status Label') ,
195 'description' => 'Entity status label',
196 'maxlength' => 64,
197 'size' => CRM_Utils_Type::BIG,
198 ) ,
199 'entity_date_start' => array(
200 'name' => 'entity_date_start',
201 'type' => CRM_Utils_Type::T_STRING,
202 'title' => ts('Entity Start Date') ,
203 'description' => 'Entity date',
204 'maxlength' => 64,
205 'size' => CRM_Utils_Type::BIG,
206 ) ,
207 'entity_date_end' => array(
208 'name' => 'entity_date_end',
209 'type' => CRM_Utils_Type::T_STRING,
210 'title' => ts('Entity End Date') ,
211 'description' => 'Entity date',
212 'maxlength' => 64,
213 'size' => CRM_Utils_Type::BIG,
214 ) ,
215 'entity_recipient' => array(
216 'name' => 'entity_recipient',
217 'type' => CRM_Utils_Type::T_STRING,
218 'title' => ts('Entity Recipient') ,
219 'description' => 'Entity recipient',
220 'maxlength' => 64,
221 'size' => CRM_Utils_Type::BIG,
222 ) ,
223 );
224 }
225 return self::$_fields;
226 }
227 /**
228 * Returns an array containing, for each field, the arary key used for that
229 * field in self::$_fields.
230 *
231 * @return array
232 */
233 static function &fieldKeys() {
234 if (!(self::$_fieldKeys)) {
235 self::$_fieldKeys = array(
236 'id' => 'id',
237 'entity' => 'entity',
238 'entity_value' => 'entity_value',
239 'entity_value_label' => 'entity_value_label',
240 'entity_status' => 'entity_status',
241 'entity_status_label' => 'entity_status_label',
242 'entity_date_start' => 'entity_date_start',
243 'entity_date_end' => 'entity_date_end',
244 'entity_recipient' => 'entity_recipient',
245 );
246 }
247 return self::$_fieldKeys;
248 }
249 /**
250 * Returns the names of this table
251 *
252 * @return string
253 */
254 static function getTableName() {
255 return self::$_tableName;
256 }
257 /**
258 * Returns if this table needs to be logged
259 *
260 * @return boolean
261 */
262 function getLog() {
263 return self::$_log;
264 }
265 /**
266 * Returns the list of fields that can be imported
267 *
268 * @param bool $prefix
269 *
270 * @return array
271 */
272 static function &import($prefix = false) {
273 if (!(self::$_import)) {
274 self::$_import = array();
275 $fields = self::fields();
276 foreach($fields as $name => $field) {
277 if (CRM_Utils_Array::value('import', $field)) {
278 if ($prefix) {
279 self::$_import['action_mapping'] = & $fields[$name];
280 } else {
281 self::$_import[$name] = & $fields[$name];
282 }
283 }
284 }
285 }
286 return self::$_import;
287 }
288 /**
289 * Returns the list of fields that can be exported
290 *
291 * @param bool $prefix
292 *
293 * @return array
294 */
295 static function &export($prefix = false) {
296 if (!(self::$_export)) {
297 self::$_export = array();
298 $fields = self::fields();
299 foreach($fields as $name => $field) {
300 if (CRM_Utils_Array::value('export', $field)) {
301 if ($prefix) {
302 self::$_export['action_mapping'] = & $fields[$name];
303 } else {
304 self::$_export[$name] = & $fields[$name];
305 }
306 }
307 }
308 }
309 return self::$_export;
310 }
311}