5 * @copyright CiviCRM LLC (c) 2004-2017
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' => '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' => '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' => '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' => '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' => 'Config Settings',
135 'table_name' => 'civicrm_persistent',
136 'entity' => 'Persistent',
137 'bao' => 'CRM_Core_BAO_Persistent',
141 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
143 return Civi
::$statics[__CLASS__
]['fields'];
147 * Return a mapping from field-name to the corresponding key (as used in fields()).
150 * Array(string $name => string $uniqueName).
152 public static function &fieldKeys() {
153 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
154 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
156 return Civi
::$statics[__CLASS__
]['fieldKeys'];
160 * Returns the names of this table
164 public static function getTableName() {
165 return self
::$_tableName;
169 * Returns if this table needs to be logged
173 public function getLog() {
178 * Returns the list of fields that can be imported
180 * @param bool $prefix
184 public static function &import($prefix = FALSE) {
185 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'persistent', $prefix, []);
190 * Returns the list of fields that can be exported
192 * @param bool $prefix
196 public static function &export($prefix = FALSE) {
197 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'persistent', $prefix, []);
202 * Returns the list of indices
204 * @param bool $localize
208 public static function indices($localize = TRUE) {
210 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;