| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | CiviCRM version 4.7 | |
| 5 | +--------------------------------------------------------------------+ |
| 6 | | Copyright CiviCRM LLC (c) 2004-2016 | |
| 7 | +--------------------------------------------------------------------+ |
| 8 | | This file is a part of CiviCRM. | |
| 9 | | | |
| 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. | |
| 13 | | | |
| 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. | |
| 18 | | | |
| 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 | +--------------------------------------------------------------------+ |
| 26 | */ |
| 27 | /** |
| 28 | * @package CRM |
| 29 | * @copyright CiviCRM LLC (c) 2004-2016 |
| 30 | * |
| 31 | * Generated from xml/schema/CRM/Core/UFMatch.xml |
| 32 | * DO NOT EDIT. Generated by CRM_Core_CodeGen |
| 33 | * (GenCodeChecksum:3753b535177e56dd00e57a1acb5d85a1) |
| 34 | */ |
| 35 | require_once 'CRM/Core/DAO.php'; |
| 36 | require_once 'CRM/Utils/Type.php'; |
| 37 | class CRM_Core_DAO_UFMatch extends CRM_Core_DAO { |
| 38 | /** |
| 39 | * static instance to hold the table name |
| 40 | * |
| 41 | * @var string |
| 42 | */ |
| 43 | static $_tableName = 'civicrm_uf_match'; |
| 44 | /** |
| 45 | * static instance to hold the field values |
| 46 | * |
| 47 | * @var array |
| 48 | */ |
| 49 | static $_fields = null; |
| 50 | /** |
| 51 | * static instance to hold the keys used in $_fields for each field. |
| 52 | * |
| 53 | * @var array |
| 54 | */ |
| 55 | static $_fieldKeys = null; |
| 56 | /** |
| 57 | * static instance to hold the FK relationships |
| 58 | * |
| 59 | * @var string |
| 60 | */ |
| 61 | static $_links = null; |
| 62 | /** |
| 63 | * static value to see if we should log any modifications to |
| 64 | * this table in the civicrm_log table |
| 65 | * |
| 66 | * @var boolean |
| 67 | */ |
| 68 | static $_log = true; |
| 69 | /** |
| 70 | * System generated ID. |
| 71 | * |
| 72 | * @var int unsigned |
| 73 | */ |
| 74 | public $id; |
| 75 | /** |
| 76 | * Which Domain is this match entry for |
| 77 | * |
| 78 | * @var int unsigned |
| 79 | */ |
| 80 | public $domain_id; |
| 81 | /** |
| 82 | * UF ID |
| 83 | * |
| 84 | * @var int unsigned |
| 85 | */ |
| 86 | public $uf_id; |
| 87 | /** |
| 88 | * UF Name |
| 89 | * |
| 90 | * @var string |
| 91 | */ |
| 92 | public $uf_name; |
| 93 | /** |
| 94 | * FK to Contact ID |
| 95 | * |
| 96 | * @var int unsigned |
| 97 | */ |
| 98 | public $contact_id; |
| 99 | /** |
| 100 | * UI language preferred by the given user/contact |
| 101 | * |
| 102 | * @var string |
| 103 | */ |
| 104 | public $language; |
| 105 | /** |
| 106 | * class constructor |
| 107 | * |
| 108 | * @return civicrm_uf_match |
| 109 | */ |
| 110 | function __construct() { |
| 111 | $this->__table = 'civicrm_uf_match'; |
| 112 | parent::__construct(); |
| 113 | } |
| 114 | /** |
| 115 | * Returns foreign keys and entity references |
| 116 | * |
| 117 | * @return array |
| 118 | * [CRM_Core_Reference_Interface] |
| 119 | */ |
| 120 | static function getReferenceColumns() { |
| 121 | if (!self::$_links) { |
| 122 | self::$_links = static ::createReferenceColumns(__CLASS__); |
| 123 | self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id'); |
| 124 | self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id'); |
| 125 | } |
| 126 | return self::$_links; |
| 127 | } |
| 128 | /** |
| 129 | * Returns all the column names of this table |
| 130 | * |
| 131 | * @return array |
| 132 | */ |
| 133 | static function &fields() { |
| 134 | if (!(self::$_fields)) { |
| 135 | self::$_fields = array( |
| 136 | 'id' => array( |
| 137 | 'name' => 'id', |
| 138 | 'type' => CRM_Utils_Type::T_INT, |
| 139 | 'title' => ts('UF Match ID') , |
| 140 | 'description' => 'System generated ID.', |
| 141 | 'required' => true, |
| 142 | ) , |
| 143 | 'domain_id' => array( |
| 144 | 'name' => 'domain_id', |
| 145 | 'type' => CRM_Utils_Type::T_INT, |
| 146 | 'title' => ts('UF Match Domain ID') , |
| 147 | 'description' => 'Which Domain is this match entry for', |
| 148 | 'required' => true, |
| 149 | 'FKClassName' => 'CRM_Core_DAO_Domain', |
| 150 | 'pseudoconstant' => array( |
| 151 | 'table' => 'civicrm_domain', |
| 152 | 'keyColumn' => 'id', |
| 153 | 'labelColumn' => 'name', |
| 154 | ) |
| 155 | ) , |
| 156 | 'uf_id' => array( |
| 157 | 'name' => 'uf_id', |
| 158 | 'type' => CRM_Utils_Type::T_INT, |
| 159 | 'title' => ts('CMS ID') , |
| 160 | 'description' => 'UF ID', |
| 161 | 'required' => true, |
| 162 | ) , |
| 163 | 'uf_name' => array( |
| 164 | 'name' => 'uf_name', |
| 165 | 'type' => CRM_Utils_Type::T_STRING, |
| 166 | 'title' => ts('CMS Unique Identifier') , |
| 167 | 'description' => 'UF Name', |
| 168 | 'maxlength' => 128, |
| 169 | 'size' => CRM_Utils_Type::HUGE, |
| 170 | ) , |
| 171 | 'contact_id' => array( |
| 172 | 'name' => 'contact_id', |
| 173 | 'type' => CRM_Utils_Type::T_INT, |
| 174 | 'title' => ts('CiviCRM Contact ID') , |
| 175 | 'description' => 'FK to Contact ID', |
| 176 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
| 177 | ) , |
| 178 | 'language' => array( |
| 179 | 'name' => 'language', |
| 180 | 'type' => CRM_Utils_Type::T_STRING, |
| 181 | 'title' => ts('Preferred Language') , |
| 182 | 'description' => 'UI language preferred by the given user/contact', |
| 183 | 'maxlength' => 5, |
| 184 | 'size' => CRM_Utils_Type::SIX, |
| 185 | ) , |
| 186 | ); |
| 187 | } |
| 188 | return self::$_fields; |
| 189 | } |
| 190 | /** |
| 191 | * Returns an array containing, for each field, the arary key used for that |
| 192 | * field in self::$_fields. |
| 193 | * |
| 194 | * @return array |
| 195 | */ |
| 196 | static function &fieldKeys() { |
| 197 | if (!(self::$_fieldKeys)) { |
| 198 | self::$_fieldKeys = array( |
| 199 | 'id' => 'id', |
| 200 | 'domain_id' => 'domain_id', |
| 201 | 'uf_id' => 'uf_id', |
| 202 | 'uf_name' => 'uf_name', |
| 203 | 'contact_id' => 'contact_id', |
| 204 | 'language' => 'language', |
| 205 | ); |
| 206 | } |
| 207 | return self::$_fieldKeys; |
| 208 | } |
| 209 | /** |
| 210 | * Returns the names of this table |
| 211 | * |
| 212 | * @return string |
| 213 | */ |
| 214 | static function getTableName() { |
| 215 | return self::$_tableName; |
| 216 | } |
| 217 | /** |
| 218 | * Returns if this table needs to be logged |
| 219 | * |
| 220 | * @return boolean |
| 221 | */ |
| 222 | function getLog() { |
| 223 | return self::$_log; |
| 224 | } |
| 225 | /** |
| 226 | * Returns the list of fields that can be imported |
| 227 | * |
| 228 | * @param bool $prefix |
| 229 | * |
| 230 | * @return array |
| 231 | */ |
| 232 | static function &import($prefix = false) { |
| 233 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_match', $prefix, array()); |
| 234 | return $r; |
| 235 | } |
| 236 | /** |
| 237 | * Returns the list of fields that can be exported |
| 238 | * |
| 239 | * @param bool $prefix |
| 240 | * |
| 241 | * @return array |
| 242 | */ |
| 243 | static function &export($prefix = false) { |
| 244 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_match', $prefix, array()); |
| 245 | return $r; |
| 246 | } |
| 247 | } |