3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Mailing/Event/Bounce.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:69f76cd03a5376a4ba729a77487e7eeb)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Mailing_Event_DAO_Bounce
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_mailing_event_bounce';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
93 public $event_queue_id;
95 * What type of bounce was it?
99 public $bounce_type_id;
101 * The reason the email bounced.
105 public $bounce_reason;
107 * When this bounce event occurred.
115 * @return civicrm_mailing_event_bounce
117 function __construct() {
118 $this->__table
= 'civicrm_mailing_event_bounce';
119 parent
::__construct();
122 * Returns foreign keys and entity references
125 * [CRM_Core_Reference_Interface]
127 static function getReferenceColumns() {
128 if (!self
::$_links) {
129 self
::$_links = static ::createReferenceColumns(__CLASS__
);
130 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
132 return self
::$_links;
135 * Returns all the column names of this table
139 static function &fields() {
140 if (!(self
::$_fields)) {
141 self
::$_fields = array(
144 'type' => CRM_Utils_Type
::T_INT
,
145 'title' => ts('Bounce ID') ,
148 'event_queue_id' => array(
149 'name' => 'event_queue_id',
150 'type' => CRM_Utils_Type
::T_INT
,
151 'title' => ts('Event Queue') ,
152 'description' => 'FK to EventQueue',
154 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
156 'bounce_type_id' => array(
157 'name' => 'bounce_type_id',
158 'type' => CRM_Utils_Type
::T_INT
,
159 'title' => ts('Bounce Type') ,
160 'description' => 'What type of bounce was it?',
164 'pseudoconstant' => array(
165 'table' => 'civicrm_mailing_bounce_type',
167 'labelColumn' => 'name',
170 'bounce_reason' => array(
171 'name' => 'bounce_reason',
172 'type' => CRM_Utils_Type
::T_STRING
,
173 'title' => ts('Bounce Reason') ,
174 'description' => 'The reason the email bounced.',
176 'size' => CRM_Utils_Type
::HUGE
,
178 'time_stamp' => array(
179 'name' => 'time_stamp',
180 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
181 'title' => ts('Timestamp') ,
182 'description' => 'When this bounce event occurred.',
187 return self
::$_fields;
190 * Returns an array containing, for each field, the arary key used for that
191 * field in self::$_fields.
195 static function &fieldKeys() {
196 if (!(self
::$_fieldKeys)) {
197 self
::$_fieldKeys = array(
199 'event_queue_id' => 'event_queue_id',
200 'bounce_type_id' => 'bounce_type_id',
201 'bounce_reason' => 'bounce_reason',
202 'time_stamp' => 'time_stamp',
205 return self
::$_fieldKeys;
208 * Returns the names of this table
212 static function getTableName() {
213 return self
::$_tableName;
216 * Returns if this table needs to be logged
224 * Returns the list of fields that can be imported
226 * @param bool $prefix
230 static function &import($prefix = false) {
231 if (!(self
::$_import)) {
232 self
::$_import = array();
233 $fields = self
::fields();
234 foreach($fields as $name => $field) {
235 if (CRM_Utils_Array
::value('import', $field)) {
237 self
::$_import['mailing_event_bounce'] = & $fields[$name];
239 self
::$_import[$name] = & $fields[$name];
244 return self
::$_import;
247 * Returns the list of fields that can be exported
249 * @param bool $prefix
253 static function &export($prefix = false) {
254 if (!(self
::$_export)) {
255 self
::$_export = array();
256 $fields = self
::fields();
257 foreach($fields as $name => $field) {
258 if (CRM_Utils_Array
::value('export', $field)) {
260 self
::$_export['mailing_event_bounce'] = & $fields[$name];
262 self
::$_export[$name] = & $fields[$name];
267 return self
::$_export;