CRM-19925 Updated DAO files
[civicrm-core.git] / CRM / Core / DAO / Persistent.php
index d4dc2dc1f0251812ead508d5e289798a20a93575..a3257570f75f4a2ce4bc02ac7421a7d4e6d39195 100644 (file)
@@ -3,7 +3,7 @@
 +--------------------------------------------------------------------+
 | CiviCRM version 4.7                                                |
 +--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2016                                |
+| Copyright CiviCRM LLC (c) 2004-2017                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 */
 /**
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
  *
  * Generated from xml/schema/CRM/Core/Persistent.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9b08831f82375bb41e0f54c03b69b79e)
+ * (GenCodeChecksum:435a9aa78f94ebc91ddf5cccd749c06c)
  */
 require_once 'CRM/Core/DAO.php';
 require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Core_DAO_Persistent constructor.
+ */
 class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
   /**
-   * static instance to hold the table name
+   * Static instance to hold the table name.
    *
    * @var string
    */
   static $_tableName = 'civicrm_persistent';
   /**
-   * static instance to hold the field values
-   *
-   * @var array
-   */
-  static $_fields = null;
-  /**
-   * static instance to hold the FK relationships
-   *
-   * @var string
-   */
-  static $_links = null;
-  /**
-   * static value to see if we should log any modifications to
-   * this table in the civicrm_log table
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
    * @var boolean
    */
@@ -91,9 +81,7 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
    */
   public $is_config;
   /**
-   * class constructor
-   *
-   * @return civicrm_persistent
+   * Class constructor.
    */
   function __construct() {
     $this->__table = 'civicrm_persistent';
@@ -105,14 +93,17 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
    * @return array
    */
   static function &fields() {
-    if (!(self::$_fields)) {
-      self::$_fields = array(
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = array(
         'id' => array(
           'name' => 'id',
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Persistent ID') ,
           'description' => 'Persistent Record Id',
           'required' => true,
+          'table_name' => 'civicrm_persistent',
+          'entity' => 'Persistent',
+          'bao' => 'CRM_Core_BAO_Persistent',
         ) ,
         'context' => array(
           'name' => 'context',
@@ -122,6 +113,9 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
           'required' => true,
           'maxlength' => 255,
           'size' => CRM_Utils_Type::HUGE,
+          'table_name' => 'civicrm_persistent',
+          'entity' => 'Persistent',
+          'bao' => 'CRM_Core_BAO_Persistent',
         ) ,
         'name' => array(
           'name' => 'name',
@@ -131,12 +125,18 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
           'required' => true,
           'maxlength' => 255,
           'size' => CRM_Utils_Type::HUGE,
+          'table_name' => 'civicrm_persistent',
+          'entity' => 'Persistent',
+          'bao' => 'CRM_Core_BAO_Persistent',
         ) ,
         'data' => array(
           'name' => 'data',
           'type' => CRM_Utils_Type::T_LONGTEXT,
           'title' => ts('Data') ,
           'description' => 'data associated with name',
+          'table_name' => 'civicrm_persistent',
+          'entity' => 'Persistent',
+          'bao' => 'CRM_Core_BAO_Persistent',
         ) ,
         'is_config' => array(
           'name' => 'is_config',
@@ -144,10 +144,14 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
           'title' => ts('Is Configuration?') ,
           'description' => 'Config Settings',
           'required' => true,
+          'table_name' => 'civicrm_persistent',
+          'entity' => 'Persistent',
+          'bao' => 'CRM_Core_BAO_Persistent',
         ) ,
       );
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
     }
-    return self::$_fields;
+    return Civi::$statics[__CLASS__]['fields'];
   }
   /**
    * Return a mapping from field-name to the corresponding key (as used in fields()).