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/Cxn/Cxn.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:486a0a360a4a9913e94e3879e51300f6)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Cxn_DAO_Cxn
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_cxn';
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 value to see if we should log any modifications to
64 * this table in the civicrm_log table
82 * Application Metadata (JSON)
100 * Permissions approved for the service (JSON)
106 * Options for the service (JSON)
112 * Is connection currently enabled?
118 * When was the connection was created.
122 public $created_date;
124 * When the connection was created or modified.
128 public $modified_date;
130 * The last time the application metadata was fetched.
134 public $fetched_date;
138 * @return civicrm_cxn
140 function __construct() {
141 $this->__table
= 'civicrm_cxn';
142 parent
::__construct();
145 * Returns all the column names of this table
149 static function &fields() {
150 if (!(self
::$_fields)) {
151 self
::$_fields = array(
154 'type' => CRM_Utils_Type
::T_INT
,
155 'title' => ts('Connection ID') ,
156 'description' => 'Connection ID',
160 'name' => 'app_guid',
161 'type' => CRM_Utils_Type
::T_STRING
,
162 'title' => ts('Application GUID') ,
163 'description' => 'Application GUID',
165 'size' => CRM_Utils_Type
::HUGE
,
168 'name' => 'app_meta',
169 'type' => CRM_Utils_Type
::T_TEXT
,
170 'title' => ts('Application Metadata (JSON)') ,
171 'description' => 'Application Metadata (JSON)',
174 'name' => 'cxn_guid',
175 'type' => CRM_Utils_Type
::T_STRING
,
176 'title' => ts('Connection GUID') ,
177 'description' => 'Connection GUID',
179 'size' => CRM_Utils_Type
::HUGE
,
183 'type' => CRM_Utils_Type
::T_TEXT
,
184 'title' => ts('Secret') ,
185 'description' => 'Shared secret',
189 'type' => CRM_Utils_Type
::T_TEXT
,
190 'title' => ts('Perm') ,
191 'description' => 'Permissions approved for the service (JSON)',
195 'type' => CRM_Utils_Type
::T_TEXT
,
196 'title' => ts('Options') ,
197 'description' => 'Options for the service (JSON)',
199 'is_active' => array(
200 'name' => 'is_active',
201 'type' => CRM_Utils_Type
::T_BOOLEAN
,
202 'title' => ts('Is Active') ,
203 'description' => 'Is connection currently enabled?',
206 'created_date' => array(
207 'name' => 'created_date',
208 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
209 'title' => ts('Created Date') ,
210 'description' => 'When was the connection was created.',
214 'modified_date' => array(
215 'name' => 'modified_date',
216 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
217 'title' => ts('Modified Date') ,
218 'description' => 'When the connection was created or modified.',
220 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
222 'fetched_date' => array(
223 'name' => 'fetched_date',
224 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
225 'title' => ts('Fetched Date') ,
226 'description' => 'The last time the application metadata was fetched.',
232 return self
::$_fields;
235 * Returns an array containing, for each field, the arary key used for that
236 * field in self::$_fields.
240 static function &fieldKeys() {
241 if (!(self
::$_fieldKeys)) {
242 self
::$_fieldKeys = array(
244 'app_guid' => 'app_guid',
245 'app_meta' => 'app_meta',
246 'cxn_guid' => 'cxn_guid',
247 'secret' => 'secret',
249 'options' => 'options',
250 'is_active' => 'is_active',
251 'created_date' => 'created_date',
252 'modified_date' => 'modified_date',
253 'fetched_date' => 'fetched_date',
256 return self
::$_fieldKeys;
259 * Returns the names of this table
263 static function getTableName() {
264 return self
::$_tableName;
267 * Returns if this table needs to be logged
275 * Returns the list of fields that can be imported
277 * @param bool $prefix
281 static function &import($prefix = false) {
282 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'cxn', $prefix, array());
286 * Returns the list of fields that can be exported
288 * @param bool $prefix
292 static function &export($prefix = false) {
293 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'cxn', $prefix, array());