1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
6 # <sales@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., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
30 # CONTRIBUTION SUBMISSION POLICY:
32 # (The following paragraph is not intended to limit the rights granted
33 # to you to modify and distribute this software under the terms of
34 # the GNU General Public License and is only of importance to you if
35 # you choose to contribute your changes and enhancements to the
36 # community by submitting them to Best Practical Solutions, LLC.)
38 # By intentionally submitting any modifications, corrections or
39 # derivatives to this work, or any other work intended for use with
40 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 # you are the copyright holder for those contributions and you grant
42 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
43 # royalty-free, perpetual, license to use, copy, create derivative
44 # works based on those contributions, and sublicense and distribute
45 # those contributions and any derivatives thereof.
47 # END BPS TAGGED BLOCK }}}
49 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
50 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
52 # !! DO NOT EDIT THIS FILE !!
71 package RT::Transaction;
76 @ISA= qw( RT::Record );
81 $self->Table('Transactions');
82 $self->SUPER::_Init(@_);
89 =head2 Create PARAMHASH
91 Create takes a hash of values and creates a row in the database:
93 varchar(64) 'ObjectType'.
98 varchar(255) 'OldValue'.
99 varchar(255) 'NewValue'.
100 varchar(255) 'ReferenceType'.
101 int(11) 'OldReference'.
102 int(11) 'NewReference'.
126 $self->SUPER::Create(
127 ObjectType => $args{'ObjectType'},
128 ObjectId => $args{'ObjectId'},
129 TimeTaken => $args{'TimeTaken'},
130 Type => $args{'Type'},
131 Field => $args{'Field'},
132 OldValue => $args{'OldValue'},
133 NewValue => $args{'NewValue'},
134 ReferenceType => $args{'ReferenceType'},
135 OldReference => $args{'OldReference'},
136 NewReference => $args{'NewReference'},
137 Data => $args{'Data'},
146 Returns the current value of id.
147 (In the database, id is stored as int(11).)
155 Returns the current value of ObjectType.
156 (In the database, ObjectType is stored as varchar(64).)
160 =head2 SetObjectType VALUE
163 Set ObjectType to VALUE.
164 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
165 (In the database, ObjectType will be stored as a varchar(64).)
173 Returns the current value of ObjectId.
174 (In the database, ObjectId is stored as int(11).)
178 =head2 SetObjectId VALUE
181 Set ObjectId to VALUE.
182 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
183 (In the database, ObjectId will be stored as a int(11).)
191 Returns the current value of TimeTaken.
192 (In the database, TimeTaken is stored as int(11).)
196 =head2 SetTimeTaken VALUE
199 Set TimeTaken to VALUE.
200 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
201 (In the database, TimeTaken will be stored as a int(11).)
209 Returns the current value of Type.
210 (In the database, Type is stored as varchar(20).)
218 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
219 (In the database, Type will be stored as a varchar(20).)
227 Returns the current value of Field.
228 (In the database, Field is stored as varchar(40).)
232 =head2 SetField VALUE
236 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
237 (In the database, Field will be stored as a varchar(40).)
245 Returns the current value of OldValue.
246 (In the database, OldValue is stored as varchar(255).)
250 =head2 SetOldValue VALUE
253 Set OldValue to VALUE.
254 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
255 (In the database, OldValue will be stored as a varchar(255).)
263 Returns the current value of NewValue.
264 (In the database, NewValue is stored as varchar(255).)
268 =head2 SetNewValue VALUE
271 Set NewValue to VALUE.
272 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
273 (In the database, NewValue will be stored as a varchar(255).)
281 Returns the current value of ReferenceType.
282 (In the database, ReferenceType is stored as varchar(255).)
286 =head2 SetReferenceType VALUE
289 Set ReferenceType to VALUE.
290 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
291 (In the database, ReferenceType will be stored as a varchar(255).)
299 Returns the current value of OldReference.
300 (In the database, OldReference is stored as int(11).)
304 =head2 SetOldReference VALUE
307 Set OldReference to VALUE.
308 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
309 (In the database, OldReference will be stored as a int(11).)
317 Returns the current value of NewReference.
318 (In the database, NewReference is stored as int(11).)
322 =head2 SetNewReference VALUE
325 Set NewReference to VALUE.
326 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
327 (In the database, NewReference will be stored as a int(11).)
335 Returns the current value of Data.
336 (In the database, Data is stored as varchar(255).)
344 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
345 (In the database, Data will be stored as a varchar(255).)
353 Returns the current value of Creator.
354 (In the database, Creator is stored as int(11).)
362 Returns the current value of Created.
363 (In the database, Created is stored as datetime.)
370 sub _CoreAccessible {
374 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
376 {read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
378 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
380 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
382 {read => 1, write => 1, sql_type => 12, length => 20, is_blob => 0, is_numeric => 0, type => 'varchar(20)', default => ''},
384 {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
386 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
388 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
390 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
392 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
394 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
396 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
398 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
400 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
405 RT::Base->_ImportOverlays();
409 This class allows "overlay" methods to be placed
410 into the following files _Overlay is for a System overlay by the original author,
411 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
413 These overlay files can contain new subs or subs to replace existing subs in this module.
415 Each of these files should begin with the line
417 no warnings qw(redefine);
419 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
421 RT::Transaction_Overlay, RT::Transaction_Vendor, RT::Transaction_Local