CRM-17663 - Configurable cache time per dashlet & auto-refresh
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
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
33 * (GenCodeChecksum:cf61768a3400766af641f4d6e9f6cba8)
34 */
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class 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 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 * Entity for which the reminder is created
58 *
59 * @var string
60 */
61 public $entity;
62 /**
63 * Entity value
64 *
65 * @var string
66 */
67 public $entity_value;
68 /**
69 * Entity value label
70 *
71 * @var string
72 */
73 public $entity_value_label;
74 /**
75 * Entity status
76 *
77 * @var string
78 */
79 public $entity_status;
80 /**
81 * Entity status label
82 *
83 * @var string
84 */
85 public $entity_status_label;
86 /**
87 * Entity date
88 *
89 * @var string
90 */
91 public $entity_date_start;
92 /**
93 * Entity date
94 *
95 * @var string
96 */
97 public $entity_date_end;
98 /**
99 * Entity recipient
100 *
101 * @var string
102 */
103 public $entity_recipient;
104 /**
105 * class constructor
106 *
107 * @return civicrm_action_mapping
108 */
109 function __construct() {
110 $this->__table = 'civicrm_action_mapping';
111 parent::__construct();
112 }
113 /**
114 * Returns all the column names of this table
115 *
116 * @return array
117 */
118 static function &fields() {
119 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
120 Civi::$statics[__CLASS__]['fields'] = array(
121 'id' => array(
122 'name' => 'id',
123 'type' => CRM_Utils_Type::T_INT,
124 'title' => ts('Action Mapping ID') ,
125 'required' => true,
126 ) ,
127 'entity' => array(
128 'name' => 'entity',
129 'type' => CRM_Utils_Type::T_STRING,
130 'title' => ts('Action Mapping Entity') ,
131 'description' => 'Entity for which the reminder is created',
132 'maxlength' => 64,
133 'size' => CRM_Utils_Type::BIG,
134 ) ,
135 'entity_value' => array(
136 'name' => 'entity_value',
137 'type' => CRM_Utils_Type::T_STRING,
138 'title' => ts('Action Mapping Entity Value') ,
139 'description' => 'Entity value',
140 'maxlength' => 64,
141 'size' => CRM_Utils_Type::BIG,
142 ) ,
143 'entity_value_label' => array(
144 'name' => 'entity_value_label',
145 'type' => CRM_Utils_Type::T_STRING,
146 'title' => ts('Value Label') ,
147 'description' => 'Entity value label',
148 'maxlength' => 64,
149 'size' => CRM_Utils_Type::BIG,
150 ) ,
151 'entity_status' => array(
152 'name' => 'entity_status',
153 'type' => CRM_Utils_Type::T_STRING,
154 'title' => ts('Status') ,
155 'description' => 'Entity status',
156 'maxlength' => 64,
157 'size' => CRM_Utils_Type::BIG,
158 ) ,
159 'entity_status_label' => array(
160 'name' => 'entity_status_label',
161 'type' => CRM_Utils_Type::T_STRING,
162 'title' => ts('Status Label') ,
163 'description' => 'Entity status label',
164 'maxlength' => 64,
165 'size' => CRM_Utils_Type::BIG,
166 ) ,
167 'entity_date_start' => array(
168 'name' => 'entity_date_start',
169 'type' => CRM_Utils_Type::T_STRING,
170 'title' => ts('Entity Start Date') ,
171 'description' => 'Entity date',
172 'maxlength' => 64,
173 'size' => CRM_Utils_Type::BIG,
174 ) ,
175 'entity_date_end' => array(
176 'name' => 'entity_date_end',
177 'type' => CRM_Utils_Type::T_STRING,
178 'title' => ts('Entity End Date') ,
179 'description' => 'Entity date',
180 'maxlength' => 64,
181 'size' => CRM_Utils_Type::BIG,
182 ) ,
183 'entity_recipient' => array(
184 'name' => 'entity_recipient',
185 'type' => CRM_Utils_Type::T_STRING,
186 'title' => ts('Entity Recipient') ,
187 'description' => 'Entity recipient',
188 'maxlength' => 64,
189 'size' => CRM_Utils_Type::BIG,
190 ) ,
191 );
192 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
193 }
194 return Civi::$statics[__CLASS__]['fields'];
195 }
196 /**
197 * Return a mapping from field-name to the corresponding key (as used in fields()).
198 *
199 * @return array
200 * Array(string $name => string $uniqueName).
201 */
202 static function &fieldKeys() {
203 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
204 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
205 }
206 return Civi::$statics[__CLASS__]['fieldKeys'];
207 }
208 /**
209 * Returns the names of this table
210 *
211 * @return string
212 */
213 static function getTableName() {
214 return self::$_tableName;
215 }
216 /**
217 * Returns if this table needs to be logged
218 *
219 * @return boolean
220 */
221 function getLog() {
222 return self::$_log;
223 }
224 /**
225 * Returns the list of fields that can be imported
226 *
227 * @param bool $prefix
228 *
229 * @return array
230 */
231 static function &import($prefix = false) {
232 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, array());
233 return $r;
234 }
235 /**
236 * Returns the list of fields that can be exported
237 *
238 * @param bool $prefix
239 *
240 * @return array
241 */
242 static function &export($prefix = false) {
243 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, array());
244 return $r;
245 }
246 }