import rt 3.2.2
[freeside.git] / rt / lib / RT / TicketCustomFieldValue.pm
1 # {{{ BEGIN BPS TAGGED BLOCK
2
3 # COPYRIGHT:
4 #  
5 # This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC 
6 #                                          <jesse@bestpractical.com>
7
8 # (Except where explicitly superseded by other copyright notices)
9
10
11 # LICENSE:
12
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
16 # from www.gnu.org.
17
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.
22
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.
26
27
28 # CONTRIBUTION SUBMISSION POLICY:
29
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.)
35
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.
44
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.  
48
49 # !! DO NOT EDIT THIS FILE !!
50 #
51
52 use strict;
53
54
55 =head1 NAME
56
57 RT::TicketCustomFieldValue
58
59
60 =head1 SYNOPSIS
61
62 =head1 DESCRIPTION
63
64 =head1 METHODS
65
66 =cut
67
68 package RT::TicketCustomFieldValue;
69 use RT::Record; 
70 use RT::CustomField;
71 use RT::Ticket;
72
73
74 use vars qw( @ISA );
75 @ISA= qw( RT::Record );
76
77 sub _Init {
78   my $self = shift; 
79
80   $self->Table('TicketCustomFieldValues');
81   $self->SUPER::_Init(@_);
82 }
83
84
85
86
87
88 =head2 Create PARAMHASH
89
90 Create takes a hash of values and creates a row in the database:
91
92   int(11) 'Ticket'.
93   int(11) 'CustomField'.
94   varchar(255) 'Content'.
95
96 =cut
97
98
99
100
101 sub Create {
102     my $self = shift;
103     my %args = ( 
104                 Ticket => '0',
105                 CustomField => '0',
106                 Content => '',
107
108                   @_);
109     $self->SUPER::Create(
110                          Ticket => $args{'Ticket'},
111                          CustomField => $args{'CustomField'},
112                          Content => $args{'Content'},
113 );
114
115 }
116
117
118
119 =head2 id
120
121 Returns the current value of id. 
122 (In the database, id is stored as int(11).)
123
124
125 =cut
126
127
128 =head2 Ticket
129
130 Returns the current value of Ticket. 
131 (In the database, Ticket is stored as int(11).)
132
133
134
135 =head2 SetTicket VALUE
136
137
138 Set Ticket to VALUE. 
139 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
140 (In the database, Ticket will be stored as a int(11).)
141
142
143 =cut
144
145
146 =head2 TicketObj
147
148 Returns the Ticket Object which has the id returned by Ticket
149
150
151 =cut
152
153 sub TicketObj {
154         my $self = shift;
155         my $Ticket =  RT::Ticket->new($self->CurrentUser);
156         $Ticket->Load($self->__Value('Ticket'));
157         return($Ticket);
158 }
159
160 =head2 CustomField
161
162 Returns the current value of CustomField. 
163 (In the database, CustomField is stored as int(11).)
164
165
166
167 =head2 SetCustomField VALUE
168
169
170 Set CustomField to VALUE. 
171 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
172 (In the database, CustomField will be stored as a int(11).)
173
174
175 =cut
176
177
178 =head2 CustomFieldObj
179
180 Returns the CustomField Object which has the id returned by CustomField
181
182
183 =cut
184
185 sub CustomFieldObj {
186         my $self = shift;
187         my $CustomField =  RT::CustomField->new($self->CurrentUser);
188         $CustomField->Load($self->__Value('CustomField'));
189         return($CustomField);
190 }
191
192 =head2 Content
193
194 Returns the current value of Content. 
195 (In the database, Content is stored as varchar(255).)
196
197
198
199 =head2 SetContent VALUE
200
201
202 Set Content to VALUE. 
203 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
204 (In the database, Content will be stored as a varchar(255).)
205
206
207 =cut
208
209
210 =head2 Creator
211
212 Returns the current value of Creator. 
213 (In the database, Creator is stored as int(11).)
214
215
216 =cut
217
218
219 =head2 Created
220
221 Returns the current value of Created. 
222 (In the database, Created is stored as datetime.)
223
224
225 =cut
226
227
228 =head2 LastUpdatedBy
229
230 Returns the current value of LastUpdatedBy. 
231 (In the database, LastUpdatedBy is stored as int(11).)
232
233
234 =cut
235
236
237 =head2 LastUpdated
238
239 Returns the current value of LastUpdated. 
240 (In the database, LastUpdated is stored as datetime.)
241
242
243 =cut
244
245
246
247 sub _CoreAccessible {
248     {
249      
250         id =>
251                 {read => 1, type => 'int(11)', default => ''},
252         Ticket => 
253                 {read => 1, write => 1, type => 'int(11)', default => '0'},
254         CustomField => 
255                 {read => 1, write => 1, type => 'int(11)', default => '0'},
256         Content => 
257                 {read => 1, write => 1, type => 'varchar(255)', default => ''},
258         Creator => 
259                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
260         Created => 
261                 {read => 1, auto => 1, type => 'datetime', default => ''},
262         LastUpdatedBy => 
263                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
264         LastUpdated => 
265                 {read => 1, auto => 1, type => 'datetime', default => ''},
266
267  }
268 };
269
270
271         eval "require RT::TicketCustomFieldValue_Overlay";
272         if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Overlay.pm}) {
273             die $@;
274         };
275
276         eval "require RT::TicketCustomFieldValue_Vendor";
277         if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Vendor.pm}) {
278             die $@;
279         };
280
281         eval "require RT::TicketCustomFieldValue_Local";
282         if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Local.pm}) {
283             die $@;
284         };
285
286
287
288
289 =head1 SEE ALSO
290
291 This class allows "overlay" methods to be placed
292 into the following files _Overlay is for a System overlay by the original author,
293 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
294
295 These overlay files can contain new subs or subs to replace existing subs in this module.
296
297 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line 
298
299    no warnings qw(redefine);
300
301 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
302
303 RT::TicketCustomFieldValue_Overlay, RT::TicketCustomFieldValue_Vendor, RT::TicketCustomFieldValue_Local
304
305 =cut
306
307
308 1;