1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2005 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;
73 @ISA= qw( RT::Record );
78 $self->Table('Transactions');
79 $self->SUPER::_Init(@_);
86 =head2 Create PARAMHASH
88 Create takes a hash of values and creates a row in the database:
90 varchar(64) 'ObjectType'.
95 varchar(255) 'OldValue'.
96 varchar(255) 'NewValue'.
97 varchar(255) 'ReferenceType'.
98 int(11) 'OldReference'.
99 int(11) 'NewReference'.
123 $self->SUPER::Create(
124 ObjectType => $args{'ObjectType'},
125 ObjectId => $args{'ObjectId'},
126 TimeTaken => $args{'TimeTaken'},
127 Type => $args{'Type'},
128 Field => $args{'Field'},
129 OldValue => $args{'OldValue'},
130 NewValue => $args{'NewValue'},
131 ReferenceType => $args{'ReferenceType'},
132 OldReference => $args{'OldReference'},
133 NewReference => $args{'NewReference'},
134 Data => $args{'Data'},
143 Returns the current value of id.
144 (In the database, id is stored as int(11).)
152 Returns the current value of ObjectType.
153 (In the database, ObjectType is stored as varchar(64).)
157 =head2 SetObjectType VALUE
160 Set ObjectType to VALUE.
161 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
162 (In the database, ObjectType will be stored as a varchar(64).)
170 Returns the current value of ObjectId.
171 (In the database, ObjectId is stored as int(11).)
175 =head2 SetObjectId VALUE
178 Set ObjectId to VALUE.
179 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
180 (In the database, ObjectId will be stored as a int(11).)
188 Returns the current value of TimeTaken.
189 (In the database, TimeTaken is stored as int(11).)
193 =head2 SetTimeTaken VALUE
196 Set TimeTaken to VALUE.
197 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
198 (In the database, TimeTaken will be stored as a int(11).)
206 Returns the current value of Type.
207 (In the database, Type is stored as varchar(20).)
215 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
216 (In the database, Type will be stored as a varchar(20).)
224 Returns the current value of Field.
225 (In the database, Field is stored as varchar(40).)
229 =head2 SetField VALUE
233 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
234 (In the database, Field will be stored as a varchar(40).)
242 Returns the current value of OldValue.
243 (In the database, OldValue is stored as varchar(255).)
247 =head2 SetOldValue VALUE
250 Set OldValue to VALUE.
251 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
252 (In the database, OldValue will be stored as a varchar(255).)
260 Returns the current value of NewValue.
261 (In the database, NewValue is stored as varchar(255).)
265 =head2 SetNewValue VALUE
268 Set NewValue to VALUE.
269 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
270 (In the database, NewValue will be stored as a varchar(255).)
278 Returns the current value of ReferenceType.
279 (In the database, ReferenceType is stored as varchar(255).)
283 =head2 SetReferenceType VALUE
286 Set ReferenceType to VALUE.
287 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
288 (In the database, ReferenceType will be stored as a varchar(255).)
296 Returns the current value of OldReference.
297 (In the database, OldReference is stored as int(11).)
301 =head2 SetOldReference VALUE
304 Set OldReference to VALUE.
305 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
306 (In the database, OldReference will be stored as a int(11).)
314 Returns the current value of NewReference.
315 (In the database, NewReference is stored as int(11).)
319 =head2 SetNewReference VALUE
322 Set NewReference to VALUE.
323 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
324 (In the database, NewReference will be stored as a int(11).)
332 Returns the current value of Data.
333 (In the database, Data is stored as varchar(255).)
341 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
342 (In the database, Data will be stored as a varchar(255).)
350 Returns the current value of Creator.
351 (In the database, Creator is stored as int(11).)
359 Returns the current value of Created.
360 (In the database, Created is stored as datetime.)
367 sub _CoreAccessible {
371 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
373 {read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
375 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
377 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
379 {read => 1, write => 1, sql_type => 12, length => 20, is_blob => 0, is_numeric => 0, type => 'varchar(20)', default => ''},
381 {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
383 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
385 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
387 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
389 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
391 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
393 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
395 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
397 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
403 eval "require RT::Transaction_Overlay";
404 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Overlay.pm}) {
408 eval "require RT::Transaction_Vendor";
409 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Vendor.pm}) {
413 eval "require RT::Transaction_Local";
414 if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Local.pm}) {
423 This class allows "overlay" methods to be placed
424 into the following files _Overlay is for a System overlay by the original author,
425 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
427 These overlay files can contain new subs or subs to replace existing subs in this module.
429 Each of these files should begin with the line
431 no warnings qw(redefine);
433 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
435 RT::Transaction_Overlay, RT::Transaction_Vendor, RT::Transaction_Local