3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
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
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.
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.
24 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
25 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
27 # !! DO NOT EDIT THIS FILE !!
46 package RT::Principal;
51 @ISA= qw( RT::Record );
56 $self->Table('Principals');
57 $self->SUPER::_Init(@_);
64 =item Create PARAMHASH
66 Create takes a hash of values and creates a row in the database:
68 varchar(16) 'PrincipalType'.
70 smallint(6) 'Disabled'.
86 PrincipalType => $args{'PrincipalType'},
87 ObjectId => $args{'ObjectId'},
88 Disabled => $args{'Disabled'},
97 Returns the current value of id.
98 (In the database, id is stored as int(11).)
106 Returns the current value of PrincipalType.
107 (In the database, PrincipalType is stored as varchar(16).)
111 =item SetPrincipalType VALUE
114 Set PrincipalType to VALUE.
115 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
116 (In the database, PrincipalType will be stored as a varchar(16).)
124 Returns the current value of ObjectId.
125 (In the database, ObjectId is stored as int(11).)
129 =item SetObjectId VALUE
132 Set ObjectId to VALUE.
133 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
134 (In the database, ObjectId will be stored as a int(11).)
142 Returns the current value of Disabled.
143 (In the database, Disabled is stored as smallint(6).)
147 =item SetDisabled VALUE
150 Set Disabled to VALUE.
151 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
152 (In the database, Disabled will be stored as a smallint(6).)
159 sub _ClassAccessible {
163 {read => 1, type => 'int(11)', default => ''},
165 {read => 1, write => 1, type => 'varchar(16)', default => ''},
167 {read => 1, write => 1, type => 'int(11)', default => ''},
169 {read => 1, write => 1, type => 'smallint(6)', default => '0'},
175 eval "require RT::Principal_Overlay";
176 if ($@ && $@ !~ qr{^Can't locate RT/Principal_Overlay.pm}) {
180 eval "require RT::Principal_Vendor";
181 if ($@ && $@ !~ qr{^Can't locate RT/Principal_Vendor.pm}) {
185 eval "require RT::Principal_Local";
186 if ($@ && $@ !~ qr{^Can't locate RT/Principal_Local.pm}) {
195 This class allows "overlay" methods to be placed
196 into the following files _Overlay is for a System overlay by the original author,
197 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
199 These overlay files can contain new subs or subs to replace existing subs in this module.
201 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
203 no warnings qw(redefine);
205 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
207 RT::Principal_Overlay, RT::Principal_Vendor, RT::Principal_Local