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 !!
57 RT::ObjectCustomFieldValue
68 package RT::ObjectCustomFieldValue;
74 @ISA= qw( RT::Record );
79 $self->Table('ObjectCustomFieldValues');
80 $self->SUPER::_Init(@_);
87 =head2 Create PARAMHASH
89 Create takes a hash of values and creates a row in the database:
91 int(11) 'CustomField'.
92 varchar(255) 'ObjectType'.
95 varchar(255) 'Content'.
96 longtext 'LargeContent'.
97 varchar(80) 'ContentType'.
98 varchar(80) 'ContentEncoding'.
99 smallint(6) 'Disabled'.
116 ContentEncoding => '',
120 $self->SUPER::Create(
121 CustomField => $args{'CustomField'},
122 ObjectType => $args{'ObjectType'},
123 ObjectId => $args{'ObjectId'},
124 SortOrder => $args{'SortOrder'},
125 Content => $args{'Content'},
126 LargeContent => $args{'LargeContent'},
127 ContentType => $args{'ContentType'},
128 ContentEncoding => $args{'ContentEncoding'},
129 Disabled => $args{'Disabled'},
138 Returns the current value of id.
139 (In the database, id is stored as int(11).)
147 Returns the current value of CustomField.
148 (In the database, CustomField is stored as int(11).)
152 =head2 SetCustomField VALUE
155 Set CustomField to VALUE.
156 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
157 (In the database, CustomField will be stored as a int(11).)
163 =head2 CustomFieldObj
165 Returns the CustomField Object which has the id returned by CustomField
172 my $CustomField = RT::CustomField->new($self->CurrentUser);
173 $CustomField->Load($self->__Value('CustomField'));
174 return($CustomField);
179 Returns the current value of ObjectType.
180 (In the database, ObjectType is stored as varchar(255).)
184 =head2 SetObjectType VALUE
187 Set ObjectType to VALUE.
188 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
189 (In the database, ObjectType will be stored as a varchar(255).)
197 Returns the current value of ObjectId.
198 (In the database, ObjectId is stored as int(11).)
202 =head2 SetObjectId VALUE
205 Set ObjectId to VALUE.
206 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
207 (In the database, ObjectId will be stored as a int(11).)
215 Returns the current value of SortOrder.
216 (In the database, SortOrder is stored as int(11).)
220 =head2 SetSortOrder VALUE
223 Set SortOrder to VALUE.
224 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
225 (In the database, SortOrder will be stored as a int(11).)
233 Returns the current value of Content.
234 (In the database, Content is stored as varchar(255).)
238 =head2 SetContent VALUE
241 Set Content to VALUE.
242 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
243 (In the database, Content will be stored as a varchar(255).)
251 Returns the current value of LargeContent.
252 (In the database, LargeContent is stored as longtext.)
256 =head2 SetLargeContent VALUE
259 Set LargeContent to VALUE.
260 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
261 (In the database, LargeContent will be stored as a longtext.)
269 Returns the current value of ContentType.
270 (In the database, ContentType is stored as varchar(80).)
274 =head2 SetContentType VALUE
277 Set ContentType to VALUE.
278 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
279 (In the database, ContentType will be stored as a varchar(80).)
285 =head2 ContentEncoding
287 Returns the current value of ContentEncoding.
288 (In the database, ContentEncoding is stored as varchar(80).)
292 =head2 SetContentEncoding VALUE
295 Set ContentEncoding to VALUE.
296 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
297 (In the database, ContentEncoding will be stored as a varchar(80).)
305 Returns the current value of Creator.
306 (In the database, Creator is stored as int(11).)
314 Returns the current value of Created.
315 (In the database, Created is stored as datetime.)
323 Returns the current value of LastUpdatedBy.
324 (In the database, LastUpdatedBy is stored as int(11).)
332 Returns the current value of LastUpdated.
333 (In the database, LastUpdated is stored as datetime.)
341 Returns the current value of Disabled.
342 (In the database, Disabled is stored as smallint(6).)
346 =head2 SetDisabled VALUE
349 Set Disabled to VALUE.
350 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
351 (In the database, Disabled will be stored as a smallint(6).)
358 sub _CoreAccessible {
362 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
364 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
366 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
368 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
370 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
372 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
374 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'longtext', default => ''},
376 {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
378 {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
380 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
382 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
384 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
386 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
388 {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
394 eval "require RT::ObjectCustomFieldValue_Overlay";
395 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Overlay.pm}) {
399 eval "require RT::ObjectCustomFieldValue_Vendor";
400 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Vendor.pm}) {
404 eval "require RT::ObjectCustomFieldValue_Local";
405 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Local.pm}) {
414 This class allows "overlay" methods to be placed
415 into the following files _Overlay is for a System overlay by the original author,
416 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
418 These overlay files can contain new subs or subs to replace existing subs in this module.
420 Each of these files should begin with the line
422 no warnings qw(redefine);
424 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
426 RT::ObjectCustomFieldValue_Overlay, RT::ObjectCustomFieldValue_Vendor, RT::ObjectCustomFieldValue_Local