Liz::OCASet::Address - generic module for Address objects
use xxLINK; $xxlink = new xxLINK; $ocaset = $xxlink->OCASet( 'customers' ); $address = $ocaset->Address; $address = $ocaset->Address( $addressID );
$street = $address->Street; $zipcode = $address->ZipCode; $city = $address->City; $state = $address->State; $country = $address->Country;
$addressID = $address->update;
Provide object oriented access to the Address opbject of the Liz::OCASet module family. Usually not accessed directly, but rather through a client module.
Create a new Address object from a client module object.
1 Liz::SQL object 2 ID to created Address object with
1 instantiated object
It is not intended to call this method directly, but rather indirectly through a client module.
$xxlink = new xxLINK; $ocaset = $xxlink->OCASet( 'customers' ); $address = $ocaset->Address; $address = $ocaset->Address( $addressID );
Update a Address object in the database.
1 ID with which the object was updated (undef = error)
$address->update;
The following methods allow you to change the fields associated with the Liz::OCASet::Address object.
Return or set the City information of the Liz::OCASet::Address object.
1 new name of the City (default: no change)
1 current/old name of the City
$address->City( 'Amsterdam' ); $city = $address->City;
Return or set the Country information of the Liz::OCASet::Address object.
1 new name of the Country (default: no change)
1 current/old name of the Country
$address->Country( 'The Netherlands' ); $country = $address->Country;
Return the Created information of the Liz::OCASet::Address object.
1 current timestamp of the Created
$created = $address->Created;
Return or set the Data information of the Liz::OCASet::Address object.
1 new name of the Data (default: no change)
1 current/old name of the Data
$address->Data( Scalars2Hash( qw($aap $noot $mies) ) ); Hash2Scalars( $address->Data );
Return the IP number from where the object was last edited.
1 IP-number where record was last edited
$ip = $contact->IP;
Return or set the Options information of the Liz::OCASet::Address object.
1 new name of the Options (default: no change)
1 current/old name of the Options
$address->Options( 'ACF' ); $options = $address->Options;
Return or set the State information of the Liz::OCASet::Address object.
1 new name of the State (default: no change)
1 current/old name of the State
$address->State( 'Illinois' ); $state = $address->State;
Return or set the Status information of the Liz::OCASet::Address object.
1 new name of the Status (default: no change)
1 current/old name of the Status
$address->Status( 1 ); $status = $address->Status;
Return or set the Street information of the Liz::OCASet::Address object.
1 new name of the Street (default: no change)
1 current/old name of the Street
$address->Street( 'Admiralengracht 281-3' ); $street = $address->Street;
Return the Updated information of the Liz::OCASet::Address object.
1 current timestamp of the Updated
$updated = $address->Updated;
Return or set the ZipCode information of the Liz::OCASet::Address object.
1 new name of the ZipCode (default: no change)
1 current/old name of the ZipCode
$address->ZipCode( '1056 EA' ); $zipcode = $address->ZipCode;
Elizabeth Mattijsen ( lizperl@INC.nl )
(C) 1998-1999 International Network Consultants
Now no longer adds Exporter to ISA: it wasn't necessary.
Removed inheritance of EXTRAFIELDS_ALPHA and EXTRAFIELDS_NUMERIC from method new as they are not necessary and actually cause problems.
Adapted method new so that the global variable $ERROR will be set with an error
message if obtaining of an existing record failed.
Updated methods new and update so that this module can be sub-classed with extra fields.
Changed the typography of this module to the new indented format.
Fixed problem in method update which would not return the ID of the object if the object was not changed.
Added support for the IP method, which returns the IP-number from which the record was created or last changed.
Added support for the IP field in the database structure.
Some cosmetic changes to the source to make it more in line with the Contact and Organization modules.
Now uses the field ``TOKEN'' and the internal subroutine RawTableName to create the database table name.
Internal subroutine RawTableName added.
Reduced memory footprint by using fully qualified global variables only.
First version of this true Perl module. Based on version .3 of the HN::Address module.