1 package FS::deploy_zone_vertex;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::deploy_zone_vertex - Object methods for deploy_zone_vertex records
13 use FS::deploy_zone_vertex;
15 $record = new FS::deploy_zone_vertex \%hash;
16 $record = new FS::deploy_zone_vertex { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::deploy_zone_vertex object represents a vertex of a polygonal
29 deployment zone (L<FS::deploy_zone>). FS::deploy_zone_vertex inherits from
30 FS::Record. The following fields are currently supported:
40 Foreign key to L<FS::deploy_zone>.
44 Latitude, as a decimal; positive values are north of the Equator.
48 Longitude, as a decimal; positive values are east of Greenwich.
58 Creates a new vertex record. To add the record to the database, see L<"insert">.
62 sub table { 'deploy_zone_vertex'; }
66 Adds this record to the database. If there is an error, returns the error,
67 otherwise returns false.
73 Delete this record from the database.
77 =item replace OLD_RECORD
79 Replaces the OLD_RECORD with this one in the database. If there is an error,
80 returns the error, otherwise returns false.
86 Checks all fields to make sure this is a valid vertex. If there is
87 an error, returns the error, otherwise returns false. Called by the insert
92 # the check method should currently be supplied - FS::Record contains some
93 # data checking routines
99 $self->ut_numbern('vertexnum')
100 || $self->ut_number('zonenum')
101 || $self->ut_coord('latitude')
102 || $self->ut_coord('longitude')
104 return $error if $error;