3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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-2015
31 * Generated from xml/schema/CRM/Core/JobLog.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Core_DAO_JobLog
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_job_log';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
89 * Which Domain is this scheduled job for
101 * Pointer to job id - not a FK though, just for logging purposes
113 * Full path to file containing job script
119 * Title line of log entry
125 * Potential extended data for specific job run (e.g. tracebacks).
133 * @return civicrm_job_log
135 function __construct() {
136 $this->__table
= 'civicrm_job_log';
137 parent
::__construct();
140 * Returns foreign keys and entity references
143 * [CRM_Core_Reference_Interface]
145 static function getReferenceColumns() {
146 if (!self
::$_links) {
147 self
::$_links = static ::createReferenceColumns(__CLASS__
);
148 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
150 return self
::$_links;
153 * Returns all the column names of this table
157 static function &fields() {
158 if (!(self
::$_fields)) {
159 self
::$_fields = array(
162 'type' => CRM_Utils_Type
::T_INT
,
163 'title' => ts('Job Log ID') ,
164 'description' => 'Job log entry Id',
167 'domain_id' => array(
168 'name' => 'domain_id',
169 'type' => CRM_Utils_Type
::T_INT
,
170 'title' => ts('Domain ID') ,
171 'description' => 'Which Domain is this scheduled job for',
173 'FKClassName' => 'CRM_Core_DAO_Domain',
174 'pseudoconstant' => array(
175 'table' => 'civicrm_domain',
177 'labelColumn' => 'name',
181 'name' => 'run_time',
182 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
183 'title' => ts('Timestamp') ,
184 'description' => 'Log entry date',
188 'type' => CRM_Utils_Type
::T_INT
,
189 'title' => ts('Job ID') ,
190 'description' => 'Pointer to job id - not a FK though, just for logging purposes',
194 'type' => CRM_Utils_Type
::T_STRING
,
195 'title' => ts('Job Name') ,
196 'description' => 'Title of the job',
198 'size' => CRM_Utils_Type
::HUGE
,
202 'type' => CRM_Utils_Type
::T_STRING
,
203 'title' => ts('Command') ,
204 'description' => 'Full path to file containing job script',
206 'size' => CRM_Utils_Type
::HUGE
,
208 'description' => array(
209 'name' => 'description',
210 'type' => CRM_Utils_Type
::T_STRING
,
211 'title' => ts('Description') ,
212 'description' => 'Title line of log entry',
214 'size' => CRM_Utils_Type
::HUGE
,
218 'type' => CRM_Utils_Type
::T_TEXT
,
219 'title' => ts('Extended Data') ,
220 'description' => 'Potential extended data for specific job run (e.g. tracebacks).',
224 return self
::$_fields;
227 * Returns an array containing, for each field, the arary key used for that
228 * field in self::$_fields.
232 static function &fieldKeys() {
233 if (!(self
::$_fieldKeys)) {
234 self
::$_fieldKeys = array(
236 'domain_id' => 'domain_id',
237 'run_time' => 'run_time',
238 'job_id' => 'job_id',
240 'command' => 'command',
241 'description' => 'description',
245 return self
::$_fieldKeys;
248 * Returns the names of this table
252 static function getTableName() {
253 return self
::$_tableName;
256 * Returns if this table needs to be logged
264 * Returns the list of fields that can be imported
266 * @param bool $prefix
270 static function &import($prefix = false) {
271 if (!(self
::$_import)) {
272 self
::$_import = array();
273 $fields = self
::fields();
274 foreach($fields as $name => $field) {
275 if (CRM_Utils_Array
::value('import', $field)) {
277 self
::$_import['job_log'] = & $fields[$name];
279 self
::$_import[$name] = & $fields[$name];
284 return self
::$_import;
287 * Returns the list of fields that can be exported
289 * @param bool $prefix
293 static function &export($prefix = false) {
294 if (!(self
::$_export)) {
295 self
::$_export = array();
296 $fields = self
::fields();
297 foreach($fields as $name => $field) {
298 if (CRM_Utils_Array
::value('export', $field)) {
300 self
::$_export['job_log'] = & $fields[$name];
302 self
::$_export[$name] = & $fields[$name];
307 return self
::$_export;