3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
24 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
25 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
27 # !! DO NOT EDIT THIS FILE !!
50 use RT::ScripCondition;
55 @ISA= qw( RT::Record );
60 $self->Table('Scrips');
61 $self->SUPER::_Init(@_);
68 =item Create PARAMHASH
70 Create takes a hash of values and creates a row in the database:
72 varchar(255) 'Description'.
73 int(11) 'ScripCondition'.
74 int(11) 'ScripAction'.
75 text 'ConditionRules'.
77 text 'CustomIsApplicableCode'.
78 text 'CustomPrepareCode'.
79 text 'CustomCommitCode'.
93 ScripCondition => '0',
97 CustomIsApplicableCode => '',
98 CustomPrepareCode => '',
99 CustomCommitCode => '',
105 $self->SUPER::Create(
106 Description => $args{'Description'},
107 ScripCondition => $args{'ScripCondition'},
108 ScripAction => $args{'ScripAction'},
109 ConditionRules => $args{'ConditionRules'},
110 ActionRules => $args{'ActionRules'},
111 CustomIsApplicableCode => $args{'CustomIsApplicableCode'},
112 CustomPrepareCode => $args{'CustomPrepareCode'},
113 CustomCommitCode => $args{'CustomCommitCode'},
114 Stage => $args{'Stage'},
115 Queue => $args{'Queue'},
116 Template => $args{'Template'},
125 Returns the current value of id.
126 (In the database, id is stored as int(11).)
134 Returns the current value of Description.
135 (In the database, Description is stored as varchar(255).)
139 =item SetDescription VALUE
142 Set Description to VALUE.
143 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
144 (In the database, Description will be stored as a varchar(255).)
152 Returns the current value of ScripCondition.
153 (In the database, ScripCondition is stored as int(11).)
157 =item SetScripCondition VALUE
160 Set ScripCondition to VALUE.
161 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
162 (In the database, ScripCondition will be stored as a int(11).)
168 =item ScripConditionObj
170 Returns the ScripCondition Object which has the id returned by ScripCondition
175 sub ScripConditionObj {
177 my $ScripCondition = RT::ScripCondition->new($self->CurrentUser);
178 $ScripCondition->Load($self->__Value('ScripCondition'));
179 return($ScripCondition);
184 Returns the current value of ScripAction.
185 (In the database, ScripAction is stored as int(11).)
189 =item SetScripAction VALUE
192 Set ScripAction to VALUE.
193 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
194 (In the database, ScripAction will be stored as a int(11).)
202 Returns the ScripAction Object which has the id returned by ScripAction
209 my $ScripAction = RT::ScripAction->new($self->CurrentUser);
210 $ScripAction->Load($self->__Value('ScripAction'));
211 return($ScripAction);
216 Returns the current value of ConditionRules.
217 (In the database, ConditionRules is stored as text.)
221 =item SetConditionRules VALUE
224 Set ConditionRules to VALUE.
225 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
226 (In the database, ConditionRules will be stored as a text.)
234 Returns the current value of ActionRules.
235 (In the database, ActionRules is stored as text.)
239 =item SetActionRules VALUE
242 Set ActionRules to VALUE.
243 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
244 (In the database, ActionRules will be stored as a text.)
250 =item CustomIsApplicableCode
252 Returns the current value of CustomIsApplicableCode.
253 (In the database, CustomIsApplicableCode is stored as text.)
257 =item SetCustomIsApplicableCode VALUE
260 Set CustomIsApplicableCode to VALUE.
261 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
262 (In the database, CustomIsApplicableCode will be stored as a text.)
268 =item CustomPrepareCode
270 Returns the current value of CustomPrepareCode.
271 (In the database, CustomPrepareCode is stored as text.)
275 =item SetCustomPrepareCode VALUE
278 Set CustomPrepareCode to VALUE.
279 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
280 (In the database, CustomPrepareCode will be stored as a text.)
286 =item CustomCommitCode
288 Returns the current value of CustomCommitCode.
289 (In the database, CustomCommitCode is stored as text.)
293 =item SetCustomCommitCode VALUE
296 Set CustomCommitCode to VALUE.
297 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
298 (In the database, CustomCommitCode will be stored as a text.)
306 Returns the current value of Stage.
307 (In the database, Stage is stored as varchar(32).)
315 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
316 (In the database, Stage will be stored as a varchar(32).)
324 Returns the current value of Queue.
325 (In the database, Queue is stored as int(11).)
333 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
334 (In the database, Queue will be stored as a int(11).)
342 Returns the Queue Object which has the id returned by Queue
349 my $Queue = RT::Queue->new($self->CurrentUser);
350 $Queue->Load($self->__Value('Queue'));
356 Returns the current value of Template.
357 (In the database, Template is stored as int(11).)
361 =item SetTemplate VALUE
364 Set Template to VALUE.
365 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
366 (In the database, Template will be stored as a int(11).)
374 Returns the Template Object which has the id returned by Template
381 my $Template = RT::Template->new($self->CurrentUser);
382 $Template->Load($self->__Value('Template'));
388 Returns the current value of Creator.
389 (In the database, Creator is stored as int(11).)
397 Returns the current value of Created.
398 (In the database, Created is stored as datetime.)
406 Returns the current value of LastUpdatedBy.
407 (In the database, LastUpdatedBy is stored as int(11).)
415 Returns the current value of LastUpdated.
416 (In the database, LastUpdated is stored as datetime.)
423 sub _ClassAccessible {
427 {read => 1, type => 'int(11)', default => ''},
429 {read => 1, write => 1, type => 'varchar(255)', default => ''},
431 {read => 1, write => 1, type => 'int(11)', default => '0'},
433 {read => 1, write => 1, type => 'int(11)', default => '0'},
435 {read => 1, write => 1, type => 'text', default => ''},
437 {read => 1, write => 1, type => 'text', default => ''},
438 CustomIsApplicableCode =>
439 {read => 1, write => 1, type => 'text', default => ''},
441 {read => 1, write => 1, type => 'text', default => ''},
443 {read => 1, write => 1, type => 'text', default => ''},
445 {read => 1, write => 1, type => 'varchar(32)', default => ''},
447 {read => 1, write => 1, type => 'int(11)', default => '0'},
449 {read => 1, write => 1, type => 'int(11)', default => '0'},
451 {read => 1, auto => 1, type => 'int(11)', default => '0'},
453 {read => 1, auto => 1, type => 'datetime', default => ''},
455 {read => 1, auto => 1, type => 'int(11)', default => '0'},
457 {read => 1, auto => 1, type => 'datetime', default => ''},
463 eval "require RT::Scrip_Overlay";
464 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Overlay.pm}) {
468 eval "require RT::Scrip_Vendor";
469 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Vendor.pm}) {
473 eval "require RT::Scrip_Local";
474 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Local.pm}) {
483 This class allows "overlay" methods to be placed
484 into the following files _Overlay is for a System overlay by the original author,
485 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
487 These overlay files can contain new subs or subs to replace existing subs in this module.
489 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
491 no warnings qw(redefine);
493 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
495 RT::Scrip_Overlay, RT::Scrip_Vendor, RT::Scrip_Local