2 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
10 FS::fiber_olt - Object methods for fiber_olt records
16 $record = new FS::fiber_olt \%hash;
17 $record = new FS::fiber_olt { 'column' => 'value' };
19 $error = $record->insert;
21 $error = $new_record->replace($old_record);
23 $error = $record->delete;
25 $error = $record->check;
29 An FS::fiber_olt object represents an Optical Line Terminal that fiber
30 connections (L<FS::svc_fiber>) connect to. FS::fiber_olt inherits from
31 FS::Record. The following fields are currently supported:
35 =item oltnum - primary key
37 =item oltname - name of this device
39 =item serial - serial number
41 =item disabled - set to 'Y' to make this OLT unavailable for new connections
51 Creates a new fiber_olt record. To add it to the database, see L<"insert">.
55 # the new method can be inherited from FS::Record, if a table method is defined
57 sub table { 'fiber_olt'; }
61 Adds this record to the database. If there is an error, returns the error,
62 otherwise returns false.
66 Delete this record from the database.
68 =item replace OLD_RECORD
70 Replaces the OLD_RECORD with this one in the database. If there is an error,
71 returns the error, otherwise returns false.
75 Checks all fields to make sure this is a valid example. If there is
76 an error, returns the error, otherwise returns false. Called by the insert
81 # the check method should currently be supplied - FS::Record contains some
82 # data checking routines
88 $self->ut_numbern('oltnum')
89 || $self->ut_text('oltname')
90 || $self->ut_text('serial')
91 || $self->ut_flag('disabled')
93 return $error if $error;
102 qsearch('svc_fiber', { 'oltnum' => $self->get('oltnum') });
109 L<FS::svc_fiber>, L<FS::Record>