1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2007 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., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/copyleft/gpl.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 }}}
48 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
49 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
51 # !! DO NOT EDIT THIS FILE !!
59 RT::ObjectCustomFieldValue
70 package RT::ObjectCustomFieldValue;
76 @ISA= qw( RT::Record );
81 $self->Table('ObjectCustomFieldValues');
82 $self->SUPER::_Init(@_);
89 =head2 Create PARAMHASH
91 Create takes a hash of values and creates a row in the database:
93 int(11) 'CustomField'.
94 varchar(255) 'ObjectType'.
97 varchar(255) 'Content'.
98 longtext 'LargeContent'.
99 varchar(80) 'ContentType'.
100 varchar(80) 'ContentEncoding'.
101 smallint(6) 'Disabled'.
118 ContentEncoding => '',
122 $self->SUPER::Create(
123 CustomField => $args{'CustomField'},
124 ObjectType => $args{'ObjectType'},
125 ObjectId => $args{'ObjectId'},
126 SortOrder => $args{'SortOrder'},
127 Content => $args{'Content'},
128 LargeContent => $args{'LargeContent'},
129 ContentType => $args{'ContentType'},
130 ContentEncoding => $args{'ContentEncoding'},
131 Disabled => $args{'Disabled'},
140 Returns the current value of id.
141 (In the database, id is stored as int(11).)
149 Returns the current value of CustomField.
150 (In the database, CustomField is stored as int(11).)
154 =head2 SetCustomField VALUE
157 Set CustomField to VALUE.
158 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
159 (In the database, CustomField will be stored as a int(11).)
165 =head2 CustomFieldObj
167 Returns the CustomField Object which has the id returned by CustomField
174 my $CustomField = RT::CustomField->new($self->CurrentUser);
175 $CustomField->Load($self->__Value('CustomField'));
176 return($CustomField);
181 Returns the current value of ObjectType.
182 (In the database, ObjectType is stored as varchar(255).)
186 =head2 SetObjectType VALUE
189 Set ObjectType to VALUE.
190 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
191 (In the database, ObjectType will be stored as a varchar(255).)
199 Returns the current value of ObjectId.
200 (In the database, ObjectId is stored as int(11).)
204 =head2 SetObjectId VALUE
207 Set ObjectId to VALUE.
208 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
209 (In the database, ObjectId will be stored as a int(11).)
217 Returns the current value of SortOrder.
218 (In the database, SortOrder is stored as int(11).)
222 =head2 SetSortOrder VALUE
225 Set SortOrder to VALUE.
226 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
227 (In the database, SortOrder will be stored as a int(11).)
235 Returns the current value of Content.
236 (In the database, Content is stored as varchar(255).)
240 =head2 SetContent VALUE
243 Set Content to VALUE.
244 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
245 (In the database, Content will be stored as a varchar(255).)
253 Returns the current value of LargeContent.
254 (In the database, LargeContent is stored as longtext.)
258 =head2 SetLargeContent VALUE
261 Set LargeContent to VALUE.
262 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
263 (In the database, LargeContent will be stored as a longtext.)
271 Returns the current value of ContentType.
272 (In the database, ContentType is stored as varchar(80).)
276 =head2 SetContentType VALUE
279 Set ContentType to VALUE.
280 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
281 (In the database, ContentType will be stored as a varchar(80).)
287 =head2 ContentEncoding
289 Returns the current value of ContentEncoding.
290 (In the database, ContentEncoding is stored as varchar(80).)
294 =head2 SetContentEncoding VALUE
297 Set ContentEncoding to VALUE.
298 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
299 (In the database, ContentEncoding will be stored as a varchar(80).)
307 Returns the current value of Creator.
308 (In the database, Creator is stored as int(11).)
316 Returns the current value of Created.
317 (In the database, Created is stored as datetime.)
325 Returns the current value of LastUpdatedBy.
326 (In the database, LastUpdatedBy is stored as int(11).)
334 Returns the current value of LastUpdated.
335 (In the database, LastUpdated is stored as datetime.)
343 Returns the current value of Disabled.
344 (In the database, Disabled is stored as smallint(6).)
348 =head2 SetDisabled VALUE
351 Set Disabled to VALUE.
352 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
353 (In the database, Disabled will be stored as a smallint(6).)
360 sub _CoreAccessible {
364 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
366 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
368 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
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 => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
374 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
376 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'longtext', default => ''},
378 {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
380 {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
382 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
384 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
386 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
388 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
390 {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
396 eval "require RT::ObjectCustomFieldValue_Overlay";
397 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Overlay.pm}) {
401 eval "require RT::ObjectCustomFieldValue_Vendor";
402 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Vendor.pm}) {
406 eval "require RT::ObjectCustomFieldValue_Local";
407 if ($@ && $@ !~ qr{^Can't locate RT/ObjectCustomFieldValue_Local.pm}) {
416 This class allows "overlay" methods to be placed
417 into the following files _Overlay is for a System overlay by the original author,
418 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
420 These overlay files can contain new subs or subs to replace existing subs in this module.
422 Each of these files should begin with the line
424 no warnings qw(redefine);
426 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
428 RT::ObjectCustomFieldValue_Overlay, RT::ObjectCustomFieldValue_Vendor, RT::ObjectCustomFieldValue_Local