1 # {{{ BEGIN BPS TAGGED BLOCK
5 # This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
6 # <jesse@bestpractical.com>
8 # (Except where explicitly superseded by other copyright notices)
13 # This work is made available to you under the terms of Version 2 of
14 # the GNU General Public License. A copy of that license should have
15 # been provided with this software, but in any event can be snarfed
18 # This work is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 # CONTRIBUTION SUBMISSION POLICY:
30 # (The following paragraph is not intended to limit the rights granted
31 # to you to modify and distribute this software under the terms of
32 # the GNU General Public License and is only of importance to you if
33 # you choose to contribute your changes and enhancements to the
34 # community by submitting them to Best Practical Solutions, LLC.)
36 # By intentionally submitting any modifications, corrections or
37 # derivatives to this work, or any other work intended for use with
38 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
39 # you are the copyright holder for those contributions and you grant
40 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
41 # royalty-free, perpetual, license to use, copy, create derivative
42 # works based on those contributions, and sublicense and distribute
43 # those contributions and any derivatives thereof.
45 # }}} END BPS TAGGED BLOCK
46 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
47 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
49 # !! DO NOT EDIT THIS FILE !!
68 package RT::Transaction;
74 @ISA= qw( RT::Record );
79 $self->Table('Transactions');
80 $self->SUPER::_Init(@_);
87 =head2 Create PARAMHASH
89 Create takes a hash of values and creates a row in the database:
91 int(11) 'EffectiveTicket'.
96 varchar(255) 'OldValue'.
97 varchar(255) 'NewValue'.
108 EffectiveTicket => '0',
118 $self->SUPER::Create(
119 EffectiveTicket => $args{'EffectiveTicket'},
120 Ticket => $args{'Ticket'},
121 TimeTaken => $args{'TimeTaken'},
122 Type => $args{'Type'},
123 Field => $args{'Field'},
124 OldValue => $args{'OldValue'},
125 NewValue => $args{'NewValue'},
126 Data => $args{'Data'},
135 Returns the current value of id.
136 (In the database, id is stored as int(11).)
142 =head2 EffectiveTicket
144 Returns the current value of EffectiveTicket.
145 (In the database, EffectiveTicket is stored as int(11).)
149 =head2 SetEffectiveTicket VALUE
152 Set EffectiveTicket to VALUE.
153 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
154 (In the database, EffectiveTicket will be stored as a int(11).)
162 Returns the current value of Ticket.
163 (In the database, Ticket is stored as int(11).)
167 =head2 SetTicket VALUE
171 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
172 (In the database, Ticket will be stored as a int(11).)
180 Returns the Ticket Object which has the id returned by Ticket
187 my $Ticket = RT::Ticket->new($self->CurrentUser);
188 $Ticket->Load($self->__Value('Ticket'));
194 Returns the current value of TimeTaken.
195 (In the database, TimeTaken is stored as int(11).)
199 =head2 SetTimeTaken VALUE
202 Set TimeTaken to VALUE.
203 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
204 (In the database, TimeTaken will be stored as a int(11).)
212 Returns the current value of Type.
213 (In the database, Type is stored as varchar(20).)
221 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
222 (In the database, Type will be stored as a varchar(20).)
230 Returns the current value of Field.
231 (In the database, Field is stored as varchar(40).)
235 =head2 SetField VALUE
239 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
240 (In the database, Field will be stored as a varchar(40).)
248 Returns the current value of OldValue.
249 (In the database, OldValue is stored as varchar(255).)
253 =head2 SetOldValue VALUE
256 Set OldValue to VALUE.
257 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
258 (In the database, OldValue will be stored as a varchar(255).)
266 Returns the current value of NewValue.
267 (In the database, NewValue is stored as varchar(255).)
271 =head2 SetNewValue VALUE
274 Set NewValue to VALUE.
275 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
276 (In the database, NewValue will be stored as a varchar(255).)
284 Returns the current value of Data.
285 (In the database, Data is stored as varchar(255).)
293 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
294 (In the database, Data will be stored as a varchar(255).)
302 Returns the current value of Creator.
303 (In the database, Creator is stored as int(11).)
311 Returns the current value of Created.
312 (In the database, Created is stored as datetime.)
319 sub _CoreAccessible {
323 {read => 1, type => 'int(11)', default => ''},
325 {read => 1, write => 1, type => 'int(11)', default => '0'},
327 {read => 1, write => 1, type => 'int(11)', default => '0'},
329 {read => 1, write => 1, type => 'int(11)', default => '0'},
331 {read => 1, write => 1, type => 'varchar(20)', default => ''},
333 {read => 1, write => 1, type => 'varchar(40)', default => ''},
335 {read => 1, write => 1, type => 'varchar(255)', default => ''},
337 {read => 1, write => 1, type => 'varchar(255)', default => ''},
339 {read => 1, write => 1, type => 'varchar(255)', default => ''},
341 {read => 1, auto => 1, type => 'int(11)', default => '0'},
343 {read => 1, auto => 1, type => 'datetime', default => ''},
349 eval "require RT::Transaction_Overlay";
350 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Overlay.pm}) {
354 eval "require RT::Transaction_Vendor";
355 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Vendor.pm}) {
359 eval "require RT::Transaction_Local";
360 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Local.pm}) {
369 This class allows "overlay" methods to be placed
370 into the following files _Overlay is for a System overlay by the original author,
371 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
373 These overlay files can contain new subs or subs to replace existing subs in this module.
375 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
377 no warnings qw(redefine);
379 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
381 RT::Transaction_Overlay, RT::Transaction_Vendor, RT::Transaction_Local