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 !!
52 @ISA= qw( RT::Record );
57 $self->Table('Templates');
58 $self->SUPER::_Init(@_);
65 =item Create PARAMHASH
67 Create takes a hash of values and creates a row in the database:
71 varchar(255) 'Description'.
73 varchar(16) 'Language'.
74 int(11) 'TranslationOf'.
95 Queue => $args{'Queue'},
96 Name => $args{'Name'},
97 Description => $args{'Description'},
98 Type => $args{'Type'},
99 Language => $args{'Language'},
100 TranslationOf => $args{'TranslationOf'},
101 Content => $args{'Content'},
110 Returns the current value of id.
111 (In the database, id is stored as int(11).)
119 Returns the current value of Queue.
120 (In the database, Queue is stored as int(11).)
128 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
129 (In the database, Queue will be stored as a int(11).)
137 Returns the Queue Object which has the id returned by Queue
144 my $Queue = RT::Queue->new($self->CurrentUser);
145 $Queue->Load($self->__Value('Queue'));
151 Returns the current value of Name.
152 (In the database, Name is stored as varchar(200).)
160 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
161 (In the database, Name will be stored as a varchar(200).)
169 Returns the current value of Description.
170 (In the database, Description is stored as varchar(255).)
174 =item SetDescription VALUE
177 Set Description to VALUE.
178 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
179 (In the database, Description will be stored as a varchar(255).)
187 Returns the current value of Type.
188 (In the database, Type is stored as varchar(16).)
196 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
197 (In the database, Type will be stored as a varchar(16).)
205 Returns the current value of Language.
206 (In the database, Language is stored as varchar(16).)
210 =item SetLanguage VALUE
213 Set Language to VALUE.
214 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
215 (In the database, Language will be stored as a varchar(16).)
223 Returns the current value of TranslationOf.
224 (In the database, TranslationOf is stored as int(11).)
228 =item SetTranslationOf VALUE
231 Set TranslationOf to VALUE.
232 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
233 (In the database, TranslationOf will be stored as a int(11).)
241 Returns the current value of Content.
242 (In the database, Content is stored as blob.)
246 =item SetContent VALUE
249 Set Content to VALUE.
250 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
251 (In the database, Content will be stored as a blob.)
259 Returns the current value of LastUpdated.
260 (In the database, LastUpdated is stored as datetime.)
268 Returns the current value of LastUpdatedBy.
269 (In the database, LastUpdatedBy is stored as int(11).)
277 Returns the current value of Creator.
278 (In the database, Creator is stored as int(11).)
286 Returns the current value of Created.
287 (In the database, Created is stored as datetime.)
294 sub _ClassAccessible {
298 {read => 1, type => 'int(11)', default => ''},
300 {read => 1, write => 1, type => 'int(11)', default => '0'},
302 {read => 1, write => 1, type => 'varchar(200)', default => ''},
304 {read => 1, write => 1, type => 'varchar(255)', default => ''},
306 {read => 1, write => 1, type => 'varchar(16)', default => ''},
308 {read => 1, write => 1, type => 'varchar(16)', default => ''},
310 {read => 1, write => 1, type => 'int(11)', default => '0'},
312 {read => 1, write => 1, type => 'blob', default => ''},
314 {read => 1, auto => 1, type => 'datetime', default => ''},
316 {read => 1, auto => 1, type => 'int(11)', default => '0'},
318 {read => 1, auto => 1, type => 'int(11)', default => '0'},
320 {read => 1, auto => 1, type => 'datetime', default => ''},
326 eval "require RT::Template_Overlay";
327 if ($@ && $@ !~ qr{^Can't locate RT/Template_Overlay.pm}) {
331 eval "require RT::Template_Vendor";
332 if ($@ && $@ !~ qr{^Can't locate RT/Template_Vendor.pm}) {
336 eval "require RT::Template_Local";
337 if ($@ && $@ !~ qr{^Can't locate RT/Template_Local.pm}) {
346 This class allows "overlay" methods to be placed
347 into the following files _Overlay is for a System overlay by the original author,
348 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
350 These overlay files can contain new subs or subs to replace existing subs in this module.
352 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
354 no warnings qw(redefine);
356 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
358 RT::Template_Overlay, RT::Template_Vendor, RT::Template_Local