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 !!
46 package RT::CustomField;
52 @ISA= qw( RT::Record );
57 $self->Table('CustomFields');
58 $self->SUPER::_Init(@_);
65 =item Create PARAMHASH
67 Create takes a hash of values and creates a row in the database:
72 varchar(255) 'Description'.
74 smallint(6) 'Disabled'.
93 Name => $args{'Name'},
94 Type => $args{'Type'},
95 Queue => $args{'Queue'},
96 Description => $args{'Description'},
97 SortOrder => $args{'SortOrder'},
98 Disabled => $args{'Disabled'},
107 Returns the current value of id.
108 (In the database, id is stored as int(11).)
116 Returns the current value of Name.
117 (In the database, Name is stored as varchar(200).)
125 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
126 (In the database, Name will be stored as a varchar(200).)
134 Returns the current value of Type.
135 (In the database, Type is stored as varchar(200).)
143 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
144 (In the database, Type will be stored as a varchar(200).)
152 Returns the current value of Queue.
153 (In the database, Queue is stored as int(11).)
161 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
162 (In the database, Queue will be stored as a int(11).)
170 Returns the Queue Object which has the id returned by Queue
177 my $Queue = RT::Queue->new($self->CurrentUser);
178 $Queue->Load($self->__Value('Queue'));
184 Returns the current value of Description.
185 (In the database, Description is stored as varchar(255).)
189 =item SetDescription VALUE
192 Set Description to VALUE.
193 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
194 (In the database, Description will be stored as a varchar(255).)
202 Returns the current value of SortOrder.
203 (In the database, SortOrder is stored as int(11).)
207 =item SetSortOrder VALUE
210 Set SortOrder to VALUE.
211 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
212 (In the database, SortOrder will be stored as a int(11).)
220 Returns the current value of Creator.
221 (In the database, Creator is stored as int(11).)
229 Returns the current value of Created.
230 (In the database, Created is stored as datetime.)
238 Returns the current value of LastUpdatedBy.
239 (In the database, LastUpdatedBy is stored as int(11).)
247 Returns the current value of LastUpdated.
248 (In the database, LastUpdated is stored as datetime.)
256 Returns the current value of Disabled.
257 (In the database, Disabled is stored as smallint(6).)
261 =item SetDisabled VALUE
264 Set Disabled to VALUE.
265 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
266 (In the database, Disabled will be stored as a smallint(6).)
273 sub _ClassAccessible {
277 {read => 1, type => 'int(11)', default => ''},
279 {read => 1, write => 1, type => 'varchar(200)', default => ''},
281 {read => 1, write => 1, type => 'varchar(200)', default => ''},
283 {read => 1, write => 1, type => 'int(11)', default => '0'},
285 {read => 1, write => 1, type => 'varchar(255)', default => ''},
287 {read => 1, write => 1, type => 'int(11)', default => '0'},
289 {read => 1, auto => 1, type => 'int(11)', default => '0'},
291 {read => 1, auto => 1, type => 'datetime', default => ''},
293 {read => 1, auto => 1, type => 'int(11)', default => '0'},
295 {read => 1, auto => 1, type => 'datetime', default => ''},
297 {read => 1, write => 1, type => 'smallint(6)', default => '0'},
303 eval "require RT::CustomField_Overlay";
304 if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Overlay.pm}) {
308 eval "require RT::CustomField_Vendor";
309 if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Vendor.pm}) {
313 eval "require RT::CustomField_Local";
314 if ($@ && $@ !~ qr{^Can't locate RT/CustomField_Local.pm}) {
323 This class allows "overlay" methods to be placed
324 into the following files _Overlay is for a System overlay by the original author,
325 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
327 These overlay files can contain new subs or subs to replace existing subs in this module.
329 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
331 no warnings qw(redefine);
333 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
335 RT::CustomField_Overlay, RT::CustomField_Vendor, RT::CustomField_Local