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