import rt 3.2.2
[freeside.git] / rt / lib / RT / Queue.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::Queue
58
59
60 =head1 SYNOPSIS
61
62 =head1 DESCRIPTION
63
64 =head1 METHODS
65
66 =cut
67
68 package RT::Queue;
69 use RT::Record; 
70
71
72 use vars qw( @ISA );
73 @ISA= qw( RT::Record );
74
75 sub _Init {
76   my $self = shift; 
77
78   $self->Table('Queues');
79   $self->SUPER::_Init(@_);
80 }
81
82
83
84
85
86 =head2 Create PARAMHASH
87
88 Create takes a hash of values and creates a row in the database:
89
90   varchar(200) 'Name'.
91   varchar(255) 'Description'.
92   varchar(120) 'CorrespondAddress'.
93   varchar(120) 'CommentAddress'.
94   int(11) 'InitialPriority'.
95   int(11) 'FinalPriority'.
96   int(11) 'DefaultDueIn'.
97   smallint(6) 'Disabled'.
98
99 =cut
100
101
102
103
104 sub Create {
105     my $self = shift;
106     my %args = ( 
107                 Name => '',
108                 Description => '',
109                 CorrespondAddress => '',
110                 CommentAddress => '',
111                 InitialPriority => '0',
112                 FinalPriority => '0',
113                 DefaultDueIn => '0',
114                 Disabled => '0',
115
116                   @_);
117     $self->SUPER::Create(
118                          Name => $args{'Name'},
119                          Description => $args{'Description'},
120                          CorrespondAddress => $args{'CorrespondAddress'},
121                          CommentAddress => $args{'CommentAddress'},
122                          InitialPriority => $args{'InitialPriority'},
123                          FinalPriority => $args{'FinalPriority'},
124                          DefaultDueIn => $args{'DefaultDueIn'},
125                          Disabled => $args{'Disabled'},
126 );
127
128 }
129
130
131
132 =head2 id
133
134 Returns the current value of id. 
135 (In the database, id is stored as int(11).)
136
137
138 =cut
139
140
141 =head2 Name
142
143 Returns the current value of Name. 
144 (In the database, Name is stored as varchar(200).)
145
146
147
148 =head2 SetName VALUE
149
150
151 Set Name to VALUE. 
152 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
153 (In the database, Name will be stored as a varchar(200).)
154
155
156 =cut
157
158
159 =head2 Description
160
161 Returns the current value of Description. 
162 (In the database, Description is stored as varchar(255).)
163
164
165
166 =head2 SetDescription VALUE
167
168
169 Set Description to VALUE. 
170 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
171 (In the database, Description will be stored as a varchar(255).)
172
173
174 =cut
175
176
177 =head2 CorrespondAddress
178
179 Returns the current value of CorrespondAddress. 
180 (In the database, CorrespondAddress is stored as varchar(120).)
181
182
183
184 =head2 SetCorrespondAddress VALUE
185
186
187 Set CorrespondAddress to VALUE. 
188 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
189 (In the database, CorrespondAddress will be stored as a varchar(120).)
190
191
192 =cut
193
194
195 =head2 CommentAddress
196
197 Returns the current value of CommentAddress. 
198 (In the database, CommentAddress is stored as varchar(120).)
199
200
201
202 =head2 SetCommentAddress VALUE
203
204
205 Set CommentAddress to VALUE. 
206 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
207 (In the database, CommentAddress will be stored as a varchar(120).)
208
209
210 =cut
211
212
213 =head2 InitialPriority
214
215 Returns the current value of InitialPriority. 
216 (In the database, InitialPriority is stored as int(11).)
217
218
219
220 =head2 SetInitialPriority VALUE
221
222
223 Set InitialPriority to VALUE. 
224 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
225 (In the database, InitialPriority will be stored as a int(11).)
226
227
228 =cut
229
230
231 =head2 FinalPriority
232
233 Returns the current value of FinalPriority. 
234 (In the database, FinalPriority is stored as int(11).)
235
236
237
238 =head2 SetFinalPriority VALUE
239
240
241 Set FinalPriority to VALUE. 
242 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
243 (In the database, FinalPriority will be stored as a int(11).)
244
245
246 =cut
247
248
249 =head2 DefaultDueIn
250
251 Returns the current value of DefaultDueIn. 
252 (In the database, DefaultDueIn is stored as int(11).)
253
254
255
256 =head2 SetDefaultDueIn VALUE
257
258
259 Set DefaultDueIn to VALUE. 
260 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
261 (In the database, DefaultDueIn will be stored as a int(11).)
262
263
264 =cut
265
266
267 =head2 Creator
268
269 Returns the current value of Creator. 
270 (In the database, Creator is stored as int(11).)
271
272
273 =cut
274
275
276 =head2 Created
277
278 Returns the current value of Created. 
279 (In the database, Created is stored as datetime.)
280
281
282 =cut
283
284
285 =head2 LastUpdatedBy
286
287 Returns the current value of LastUpdatedBy. 
288 (In the database, LastUpdatedBy is stored as int(11).)
289
290
291 =cut
292
293
294 =head2 LastUpdated
295
296 Returns the current value of LastUpdated. 
297 (In the database, LastUpdated is stored as datetime.)
298
299
300 =cut
301
302
303 =head2 Disabled
304
305 Returns the current value of Disabled. 
306 (In the database, Disabled is stored as smallint(6).)
307
308
309
310 =head2 SetDisabled VALUE
311
312
313 Set Disabled to VALUE. 
314 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
315 (In the database, Disabled will be stored as a smallint(6).)
316
317
318 =cut
319
320
321
322 sub _CoreAccessible {
323     {
324      
325         id =>
326                 {read => 1, type => 'int(11)', default => ''},
327         Name => 
328                 {read => 1, write => 1, type => 'varchar(200)', default => ''},
329         Description => 
330                 {read => 1, write => 1, type => 'varchar(255)', default => ''},
331         CorrespondAddress => 
332                 {read => 1, write => 1, type => 'varchar(120)', default => ''},
333         CommentAddress => 
334                 {read => 1, write => 1, type => 'varchar(120)', default => ''},
335         InitialPriority => 
336                 {read => 1, write => 1, type => 'int(11)', default => '0'},
337         FinalPriority => 
338                 {read => 1, write => 1, type => 'int(11)', default => '0'},
339         DefaultDueIn => 
340                 {read => 1, write => 1, type => 'int(11)', default => '0'},
341         Creator => 
342                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
343         Created => 
344                 {read => 1, auto => 1, type => 'datetime', default => ''},
345         LastUpdatedBy => 
346                 {read => 1, auto => 1, type => 'int(11)', default => '0'},
347         LastUpdated => 
348                 {read => 1, auto => 1, type => 'datetime', default => ''},
349         Disabled => 
350                 {read => 1, write => 1, type => 'smallint(6)', default => '0'},
351
352  }
353 };
354
355
356         eval "require RT::Queue_Overlay";
357         if ($@ && $@ !~ qr{^Can't locate RT/Queue_Overlay.pm}) {
358             die $@;
359         };
360
361         eval "require RT::Queue_Vendor";
362         if ($@ && $@ !~ qr{^Can't locate RT/Queue_Vendor.pm}) {
363             die $@;
364         };
365
366         eval "require RT::Queue_Local";
367         if ($@ && $@ !~ qr{^Can't locate RT/Queue_Local.pm}) {
368             die $@;
369         };
370
371
372
373
374 =head1 SEE ALSO
375
376 This class allows "overlay" methods to be placed
377 into the following files _Overlay is for a System overlay by the original author,
378 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
379
380 These overlay files can contain new subs or subs to replace existing subs in this module.
381
382 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line 
383
384    no warnings qw(redefine);
385
386 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
387
388 RT::Queue_Overlay, RT::Queue_Vendor, RT::Queue_Local
389
390 =cut
391
392
393 1;