5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/Persistent.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:f215d2eac0f061ca085bcee3c4dca25f)
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 static $_tableName = 'civicrm_persistent';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 'table_name' => 'civicrm_persistent',
89 'entity' => 'Persistent',
90 'bao' => 'CRM_Core_BAO_Persistent',
95 'type' => CRM_Utils_Type
::T_STRING
,
96 'title' => ts('Context'),
97 'description' => ts('Context for which name data pair is to be stored'),
100 'size' => CRM_Utils_Type
::HUGE
,
101 'table_name' => 'civicrm_persistent',
102 'entity' => 'Persistent',
103 'bao' => 'CRM_Core_BAO_Persistent',
108 'type' => CRM_Utils_Type
::T_STRING
,
109 'title' => ts('Name'),
110 'description' => ts('Name of Context'),
113 'size' => CRM_Utils_Type
::HUGE
,
114 'table_name' => 'civicrm_persistent',
115 'entity' => 'Persistent',
116 'bao' => 'CRM_Core_BAO_Persistent',
121 'type' => CRM_Utils_Type
::T_LONGTEXT
,
122 'title' => ts('Data'),
123 'description' => ts('data associated with name'),
124 'table_name' => 'civicrm_persistent',
125 'entity' => 'Persistent',
126 'bao' => 'CRM_Core_BAO_Persistent',
130 'name' => 'is_config',
131 'type' => CRM_Utils_Type
::T_BOOLEAN
,
132 'title' => ts('Is Configuration?'),
133 'description' => ts('Config Settings'),
136 'table_name' => 'civicrm_persistent',
137 'entity' => 'Persistent',
138 'bao' => 'CRM_Core_BAO_Persistent',
142 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
144 return Civi
::$statics[__CLASS__
]['fields'];
148 * Return a mapping from field-name to the corresponding key (as used in fields()).
151 * Array(string $name => string $uniqueName).
153 public static function &fieldKeys() {
154 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
155 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
157 return Civi
::$statics[__CLASS__
]['fieldKeys'];
161 * Returns the names of this table
165 public static function getTableName() {
166 return self
::$_tableName;
170 * Returns if this table needs to be logged
174 public function getLog() {
179 * Returns the list of fields that can be imported
181 * @param bool $prefix
185 public static function &import($prefix = FALSE) {
186 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'persistent', $prefix, []);
191 * Returns the list of fields that can be exported
193 * @param bool $prefix
197 public static function &export($prefix = FALSE) {
198 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'persistent', $prefix, []);
203 * Returns the list of indices
205 * @param bool $localize
209 public static function indices($localize = TRUE) {
211 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;