1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
6 # <sales@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/licenses/old-licenses/gpl-2.0.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 }}}
49 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
50 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
52 # !! DO NOT EDIT THIS FILE !!
72 use base 'RT::Record';
78 $self->SUPER::_Init(@_);
85 =head2 Create PARAMHASH
87 Create takes a hash of values and creates a row in the database:
89 varchar(25) 'PrincipalType'.
90 int(11) 'PrincipalId'.
91 varchar(25) 'RightName'.
92 varchar(25) 'ObjectType'.
94 int(11) 'DelegatedBy'.
95 int(11) 'DelegatedFrom'.
111 DelegatedFrom => '0',
114 $self->SUPER::Create(
115 PrincipalType => $args{'PrincipalType'},
116 PrincipalId => $args{'PrincipalId'},
117 RightName => $args{'RightName'},
118 ObjectType => $args{'ObjectType'},
119 ObjectId => $args{'ObjectId'},
120 DelegatedBy => $args{'DelegatedBy'},
121 DelegatedFrom => $args{'DelegatedFrom'},
130 Returns the current value of id.
131 (In the database, id is stored as int(11).)
139 Returns the current value of PrincipalType.
140 (In the database, PrincipalType is stored as varchar(25).)
144 =head2 SetPrincipalType VALUE
147 Set PrincipalType to VALUE.
148 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
149 (In the database, PrincipalType will be stored as a varchar(25).)
157 Returns the current value of PrincipalId.
158 (In the database, PrincipalId is stored as int(11).)
162 =head2 SetPrincipalId VALUE
165 Set PrincipalId to VALUE.
166 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
167 (In the database, PrincipalId will be stored as a int(11).)
175 Returns the current value of RightName.
176 (In the database, RightName is stored as varchar(25).)
180 =head2 SetRightName VALUE
183 Set RightName to VALUE.
184 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
185 (In the database, RightName will be stored as a varchar(25).)
193 Returns the current value of ObjectType.
194 (In the database, ObjectType is stored as varchar(25).)
198 =head2 SetObjectType VALUE
201 Set ObjectType to VALUE.
202 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
203 (In the database, ObjectType will be stored as a varchar(25).)
211 Returns the current value of ObjectId.
212 (In the database, ObjectId is stored as int(11).)
216 =head2 SetObjectId VALUE
219 Set ObjectId to VALUE.
220 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
221 (In the database, ObjectId will be stored as a int(11).)
229 Returns the current value of DelegatedBy.
230 (In the database, DelegatedBy is stored as int(11).)
234 =head2 SetDelegatedBy VALUE
237 Set DelegatedBy to VALUE.
238 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
239 (In the database, DelegatedBy will be stored as a int(11).)
247 Returns the current value of DelegatedFrom.
248 (In the database, DelegatedFrom is stored as int(11).)
252 =head2 SetDelegatedFrom VALUE
255 Set DelegatedFrom to VALUE.
256 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
257 (In the database, DelegatedFrom will be stored as a int(11).)
264 sub _CoreAccessible {
268 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
270 {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
272 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
274 {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
276 {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
278 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
280 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
282 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
287 RT::Base->_ImportOverlays();
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.
295 These overlay files can contain new subs or subs to replace existing subs in this module.
297 Each of these files should begin with the line
299 no warnings qw(redefine);
301 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
303 RT::ACE_Overlay, RT::ACE_Vendor, RT::ACE_Local