2 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::fiber_olt - Object methods for fiber_olt records
15 $record = new FS::fiber_olt \%hash;
16 $record = new FS::fiber_olt { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::fiber_olt object represents an Optical Line Terminal that fiber
29 connections (L<FS::svc_fiber>) connect to. FS::fiber_olt inherits from
30 FS::Record. The following fields are currently supported:
34 =item oltnum - primary key
36 =item oltname - name of this device
38 =item serial - serial number
40 =item disabled - set to 'Y' to make this OLT unavailable for new connections
50 Creates a new fiber_olt record. To add it to the database, see L<"insert">.
54 # the new method can be inherited from FS::Record, if a table method is defined
56 sub table { 'fiber_olt'; }
60 Adds this record to the database. If there is an error, returns the error,
61 otherwise returns false.
65 Delete this record from the database.
67 =item replace OLD_RECORD
69 Replaces the OLD_RECORD with this one in the database. If there is an error,
70 returns the error, otherwise returns false.
74 Checks all fields to make sure this is a valid example. If there is
75 an error, returns the error, otherwise returns false. Called by the insert
80 # the check method should currently be supplied - FS::Record contains some
81 # data checking routines
87 $self->ut_numbern('oltnum')
88 || $self->ut_text('oltname')
89 || $self->ut_text('serial')
90 || $self->ut_flag('disabled')
92 return $error if $error;
101 L<FS::svc_fiber>, L<FS::Record>