5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Core/Persistent.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:4044954800a1201a4e3c376d48342f4c)
13 * Database access object for the Persistent entity.
15 class CRM_Core_DAO_Persistent
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_persistent';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
32 * Persistent Record Id
39 * Context for which name data pair is to be stored
53 * data associated with name
69 public function __construct() {
70 $this->__table
= 'civicrm_persistent';
71 parent
::__construct();
75 * Returns all the column names of this table
79 public static function &fields() {
80 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
81 Civi
::$statics[__CLASS__
]['fields'] = [
84 'type' => CRM_Utils_Type
::T_INT
,
85 'title' => ts('Persistent ID'),
86 'description' => ts('Persistent Record Id'),
88 'where' => 'civicrm_persistent.id',
89 'table_name' => 'civicrm_persistent',
90 'entity' => 'Persistent',
91 'bao' => 'CRM_Core_BAO_Persistent',
96 'type' => CRM_Utils_Type
::T_STRING
,
97 'title' => ts('Context'),
98 'description' => ts('Context for which name data pair is to be stored'),
101 'size' => CRM_Utils_Type
::HUGE
,
102 'where' => 'civicrm_persistent.context',
103 'table_name' => 'civicrm_persistent',
104 'entity' => 'Persistent',
105 'bao' => 'CRM_Core_BAO_Persistent',
110 'type' => CRM_Utils_Type
::T_STRING
,
111 'title' => ts('Name'),
112 'description' => ts('Name of Context'),
115 'size' => CRM_Utils_Type
::HUGE
,
116 'where' => 'civicrm_persistent.name',
117 'table_name' => 'civicrm_persistent',
118 'entity' => 'Persistent',
119 'bao' => 'CRM_Core_BAO_Persistent',
124 'type' => CRM_Utils_Type
::T_LONGTEXT
,
125 'title' => ts('Data'),
126 'description' => ts('data associated with name'),
127 'where' => 'civicrm_persistent.data',
128 'table_name' => 'civicrm_persistent',
129 'entity' => 'Persistent',
130 'bao' => 'CRM_Core_BAO_Persistent',
134 'name' => 'is_config',
135 'type' => CRM_Utils_Type
::T_BOOLEAN
,
136 'title' => ts('Is Configuration?'),
137 'description' => ts('Config Settings'),
139 'where' => 'civicrm_persistent.is_config',
141 'table_name' => 'civicrm_persistent',
142 'entity' => 'Persistent',
143 'bao' => 'CRM_Core_BAO_Persistent',
147 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
149 return Civi
::$statics[__CLASS__
]['fields'];
153 * Return a mapping from field-name to the corresponding key (as used in fields()).
156 * Array(string $name => string $uniqueName).
158 public static function &fieldKeys() {
159 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
160 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
162 return Civi
::$statics[__CLASS__
]['fieldKeys'];
166 * Returns the names of this table
170 public static function getTableName() {
171 return self
::$_tableName;
175 * Returns if this table needs to be logged
179 public function getLog() {
184 * Returns the list of fields that can be imported
186 * @param bool $prefix
190 public static function &import($prefix = FALSE) {
191 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'persistent', $prefix, []);
196 * Returns the list of fields that can be exported
198 * @param bool $prefix
202 public static function &export($prefix = FALSE) {
203 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'persistent', $prefix, []);
208 * Returns the list of indices
210 * @param bool $localize
214 public static function indices($localize = TRUE) {
216 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;