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 !!
74 @ISA= qw( RT::Record );
79 $self->Table('Templates');
80 $self->SUPER::_Init(@_);
87 =head2 Create PARAMHASH
89 Create takes a hash of values and creates a row in the database:
93 varchar(255) 'Description'.
95 varchar(16) 'Language'.
96 int(11) 'TranslationOf'.
112 TranslationOf => '0',
116 $self->SUPER::Create(
117 Queue => $args{'Queue'},
118 Name => $args{'Name'},
119 Description => $args{'Description'},
120 Type => $args{'Type'},
121 Language => $args{'Language'},
122 TranslationOf => $args{'TranslationOf'},
123 Content => $args{'Content'},
132 Returns the current value of id.
133 (In the database, id is stored as int(11).)
141 Returns the current value of Queue.
142 (In the database, Queue is stored as int(11).)
146 =head2 SetQueue VALUE
150 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
151 (In the database, Queue will be stored as a int(11).)
159 Returns the Queue Object which has the id returned by Queue
166 my $Queue = RT::Queue->new($self->CurrentUser);
167 $Queue->Load($self->__Value('Queue'));
173 Returns the current value of Name.
174 (In the database, Name is stored as varchar(200).)
182 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
183 (In the database, Name will be stored as a varchar(200).)
191 Returns the current value of Description.
192 (In the database, Description is stored as varchar(255).)
196 =head2 SetDescription VALUE
199 Set Description to VALUE.
200 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
201 (In the database, Description will be stored as a varchar(255).)
209 Returns the current value of Type.
210 (In the database, Type is stored as varchar(16).)
218 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
219 (In the database, Type will be stored as a varchar(16).)
227 Returns the current value of Language.
228 (In the database, Language is stored as varchar(16).)
232 =head2 SetLanguage VALUE
235 Set Language to VALUE.
236 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
237 (In the database, Language will be stored as a varchar(16).)
245 Returns the current value of TranslationOf.
246 (In the database, TranslationOf is stored as int(11).)
250 =head2 SetTranslationOf VALUE
253 Set TranslationOf to VALUE.
254 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
255 (In the database, TranslationOf will be stored as a int(11).)
263 Returns the current value of Content.
264 (In the database, Content is stored as blob.)
268 =head2 SetContent VALUE
271 Set Content to VALUE.
272 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
273 (In the database, Content will be stored as a blob.)
281 Returns the current value of LastUpdated.
282 (In the database, LastUpdated is stored as datetime.)
290 Returns the current value of LastUpdatedBy.
291 (In the database, LastUpdatedBy is stored as int(11).)
299 Returns the current value of Creator.
300 (In the database, Creator is stored as int(11).)
308 Returns the current value of Created.
309 (In the database, Created is stored as datetime.)
316 sub _CoreAccessible {
320 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
322 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
324 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
326 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
328 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
330 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
332 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
334 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
336 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
338 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
340 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
342 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
348 eval "require RT::Template_Overlay";
349 if ($@ && $@ !~ qr{^Can't locate RT/Template_Overlay.pm}) {
353 eval "require RT::Template_Vendor";
354 if ($@ && $@ !~ qr{^Can't locate RT/Template_Vendor.pm}) {
358 eval "require RT::Template_Local";
359 if ($@ && $@ !~ qr{^Can't locate RT/Template_Local.pm}) {
368 This class allows "overlay" methods to be placed
369 into the following files _Overlay is for a System overlay by the original author,
370 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
372 These overlay files can contain new subs or subs to replace existing subs in this module.
374 Each of these files should begin with the line
376 no warnings qw(redefine);
378 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
380 RT::Template_Overlay, RT::Template_Vendor, RT::Template_Local