NAME

Liz::ProjectSet::Client - Client objects within the ProjectSet


SYNOPSIS

 use xxLINK;
 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $client = $projectset->Client;


DESCRIPTION

Provide object oriented access to the Client tables of the ProjectSet.


BASIC METHODS


new

Create a new Client object from a ProjectSet object.

Input Parameters

 1 ProjectSet object
 2 ID or name to create Client object with
   (default: none = new client)
Output Parameters

 1 instantiated object
Note

It is not intended to call this method directly, but rather indirectly through the Liz::ProjectSet module.

Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $client = $projectset->Client
 $client = $projectset->Client( $clientID );


update

Update the Client object. This stores the message in the client forum and updates the appropriate forum list when appropriate.

Output Parameters

 1 the ID of the Client object
Example

 $clientID = $client->update;


CONTENT METHODS

The following methods allow you to inspect and/or change certain fields of the Liz::ProjectSet::Client object.


AccountManager

Return the AccountManager object of the Client (which is in fact an Employee object). Please note that you should still set the AccountManagerID value in the Client object after updating this object.

Output Parameters

 1 Employee object
Example

 $accountmanager = $client->AccountManager;
 $client->AccountManagerID( $accountmanager->update );


AccountManagerID

Set or return the AccountManagerID of the Client. Use method AccountManager to create the associated Employee object.

Input Parameters

 1 new accountmanagerID of the Client
   (default: no change)
Output Parameters

 1 current/old accountmanagerID of the Client
Example

 $client->AccountManagerID( $accountmanagerID );
 $accountmanagerID = $client->AccountManagerID;


BankAccount

Return the BankAccount of the client.

Input Parameters

 1 BankAccount
Output Parameters

 1 current BankAccount


Contact

Return the Contact object of one of the Contacts of the Client.

Input Parameters

 1 ID of the Contact
Output Parameters

 1 Contact object
Example

 $contact = $client->Contact( $contactID );


Created

Return the Created information of the Liz::ProjectSet::Client object.

Output Parameters

 1 current timestamp of the Created
Example

 $created = $client->Created;


Description

Set or return the description of the Client.

Input Parameters

 1 new description of the Client
   (default: no change)
Output Parameters

 1 current/old description of the Client
Example

 $client->Description( $description );
 $description = $client->Description;


EmployeeIDs

Return or set the EmployeeIDs (list of contactID's from the EmployeeSet) of the Liz::ProjectSet::Client object. Because the associations are linked to the ID of the client, this method should only be called after the first successful update.

Input Parameters

 1..N new employeeID's
      (default: no change)
Output Parameters

 1..N current/old employeeID's
Example

 $client->EmployeeIDs( @employeeID );
 @employeeID = $client->EmployeeIDs;


FirstLiveOn

Set or return the date on which the first site of the Client went live.

Input Parameters

 1 new timestamp for first live date
   (default: no change)
Output Parameters

 1 current/old timestamp for first live date
Example

 $client->FirstLiveOn( $firstliveon );
 $firstliveon = $client->FirstLiveOn;


ForeignKey

Set or return the foreign key of the Client. This is usually the ID of the client in an external system.

Input Parameters

 1 new foreign key of the Client
   (default: no change)
Output Parameters

 1 current/old foreign key of the Client
Example

 $client->ForeignKey( $foreignkey );
 $foreignkey = $client->ForeignKey;


History

Set or return the history of the Client.

Input Parameters

 1 new history of the Client
   (default: no change)
Output Parameters

 1 current/old history of the Client
Example

 $client->History( $history );
 $history = $client->History;


InvoiceContact

Return the InvoiceContact object of the Client (which is in fact a Contact object). Please note that you should still set the InvoiceContactID value in the Client object after updating this object.

Output Parameters

 1 Contact object
Example

 $invoicecontact = $client->InvoiceContact;
 $client->InvoiceContactID( $invoicecontact->update );


InvoiceContactID

Return or set the InvoiceContactID of the Liz::ProjectSet::Client object. Use method InvoiceContact to create the associated Contact object.

Input Parameters

 1 new InvoiceContactID
   (default: no change)
Output Parameters

 1 current/old InvoiceContactID
Example

 $client->InvoiceContactID( $invoicecontactID );
 $invoicecontactID = $client->InvoiceContactID;


MainContact

Return the MainContact object of the Client (which is in fact a Contact object). Please note that you should still set the MainContactID value in the Client object after updating this object.

Output Parameters

 1 Contact object
Example

 $maincontact = $client->MainContact;
 $client->MainContactID( $maincontact->update );


MainContactID

Return or set the MainContactID of the Liz::ProjectSet::Client object. Use method MainContact to create the associated Contact object.

Input Parameters

 1 new MainContactID
   (default: no change)
Output Parameters

 1 current/old MainContactID
Example

 $client->MainContactID( $maincontactID );
 $maincontactID = $client->MainContactID;


Name

Set or return the name of the Client.

Input Parameters

 1 new name of the Client
   (default: no change)
Output Parameters

 1 current/old name of the Client
Example

 $client->Name( $name );
 $name = $client->Name;


Organization

Return the Organization object of the Client (which is in fact a Organization object). Please note that you should still set the OrganizationID value in the Client object after updating this object.

Output Parameters

 1 Organization object
Example

 $organization = $client->Organization;
 $client->OrganizationID( $organization->update );


OrganizationID

Return or set the OrganizationID of the Liz::ProjectSet::Client object. Use method Organization to create the associated Organization object.

Input Parameters

 1 new organizationID
   (default: no change)
Output Parameters

 1 current/old organizationID
Example

 $client->OrganizationID( $organizationID );
 $organizationID = $client->OrganizationID;


OtherContactIDs

Return or set the OtherContactIDs (list of contactID's) of the Liz::ProjectSet::Client object. Because the associations are linked to the ID of the client, this method should only be called after the first successful update.

Input Parameters

 1..N new othercontactID's
      (default: no change)
Output Parameters

 1..N current/old othercontactID's
Example

 $client->OtherContactIDs( @othercontactID );
 @othercontactID = $client->OtherContactIDs;


ProjectSet

Return the ProjectSet object of the Liz::ProjectSet::Client object.

Output Parameters

 1 ProjectSet object
Example

 $projectset = $client->ProjectSet;


SortName

Return or set the SortName information of the Liz::ProjectSet::Client object.

Input Parameters

 1 new value of the SortName
   (default: no change)
Output Parameters

 1 current/old value of the SortName
Example

 $client->SortName( $sortname );
 $sortname = $client->SortName;


Status

Return or set the Status information of the Liz::ProjectSet::Client object.

Input Parameters

 1 new value of the Status
   (default: no change)
Output Parameters

 1 current/old value of the Status
Example

 $client->Status( 1 );
 $status = $client->Status;


Updated

Return the Updated information of the Liz::ProjectSet::Client object.

Output Parameters

 1 current timestamp of the Updated
Example

 $updated = $client->Updated;


URL

Return or set the URL of the Liz::ProjectSet::Client object.

Input Parameters

 1 new URL of the client
   (default: no change)
Output Parameters

 1 current/old URL of the client
Example

 $client->URL( $url );
 $url = $client->URL;


URLID

Return the URLID of the Liz::ProjectSet::Client object. It can be used to create a Liz::URLSet::URL object. This is usually only used internally. It is better to use the more transparant method URL instead.

Output Parameters

 1 current urlID
Example

 $urlID = $client->URLID;


LIST METHODS

The following methods return an SQL-statement(-like) handle that allows listing of (a selection of) the objects of a certain type.


Contacts

Return an SQL-statement(-like) handle that contains a selection of the Contacts available for the Client. The usual field names for contacts can be specified with the first parameter.

Input Parameters

 1 fields to return for each Contact, separated by comma's
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $client->Contacts;
 $result = $client->Contacts( 'ID,firstname,name','status=0' );


CreditMaximum

Return the CreditMaximum of the client.

Input Parameters

 1 CreditMaximum 
Output Parameters

 1 current CreditMaximum 


COCDate

Return the COCDate of the client.

Input Parameters

 1 COCDate 
Output Parameters

 1 current COCDate 


COCName

Return the COCName of the client.

Input Parameters

 1 COCName
Output Parameters

 1 current COCName


COCNumber

Return the COCNumber of the client.

Input Parameters

 1 COCNumber 
Output Parameters

 1 current COCNumber 


Projects

Return an SQL-statement(-like) handle that contains a selection of the Projects available for the Client. The following field names can be specified with the first parameter:

 ID
 The ID of the Project.  Can be used as parameter on the L<Project>
 method.

 name
 The name of the Project, e.g. 'Implementatie MailingList Functionaliteit'.

 deadline
 Timestamp for the deadline of the project

 status
 The status of the Project: this can be any number between 0 and 255 inclusive.

 leaderID
 The ID of the Leader information of the Project.

 updated
 Timestamp when the Project record was last updated in the database.

 created
 Timestamp when the Project record was created in the database.

 sortname
 The string on which the Project can be sorted.  It usually consists of
 the name field, followed by the firstname and prefix field, all in
 lowercase and with all non-alphanumeric characters removed.

 clientID
 The ID of the Client information of the Project.  If non-zero, can be
 used to create an L<Client> object with.

 organizationID
 The ID of the Organization information of the Project.  If non-zero, can be
 used to create an L<Organization> object with.

 maincontactID
 The ID of the Contact information of the Project.  If non-zero, can be
 used to create an L<Contact> object with.

 invoicecontactID
 The ID of the Contact with regards to invoices of the Project.  If non-zero,
 can be used to create an L<Contact> object with.

 urlID
 The ID of the URL associated with the Project.  If non-zero, can be
 used to create an L<URL> object with.
Input Parameters

 1 fields to return for each Project, seperated by comma's
   (default: 'ID,name,deadline,status,leaderID,updated,created,sortname,clientID,organizationID,maincontactID,invoicecontactID,urlID' );
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Projects;
 $result = $projectset->Projects( 'ID,name,leaderID','status=0' );


VATNumber

Return the VATNumber of the client.

Input Parameters

 1 VATNumber 
Output Parameters

 1 current VATNumber 


AUTHORS

Elizabeth Mattijsen ( lizperl@INC.nl )

Contributions by:

- Sjoerd Lawende ( sjoerd@xxlink.nl )


COPYRIGHT

(C) 1998-1999 International Network Consultants


HISTORY

Version 0.19, 30 November 1999

update now sets the alteredbyID-field with the current userID.

Version 0.18, 29 November 1999

Added stuff for the new alteredbyID-field.

Version 0.17, 2 November 1999

Fixed problems with Quote/Zero-ing of new fields.

Version 0.16, 22 October 1999

Added accessor BankAccount, CreditMaximum, VATNumber, COCNumber, COCName, COCDate for the new fields.

Version 0.15, 13 October 1999

Added a generic Contact method to be used together with the Contacts method, or the InvoiceContactID and MainContactID methods.

Added methods AccountManager, InvoiceContact, MainContact and Organization to quickly create the right Contact and Organization objects from the ProjectSet.

Method ProjectSet added to obtain the ProjectSet object.

Method new now places the ProjectSet object in its own fields.

Version 0.14, 30 September 1999

Now no longer adds Exporter to ISA: it wasn't necessary.

Version 0.13, September 17, 1999

Removed Projects2Pulldown from this module (SL)

Version 0.12, August 20, 1999

Support for extra fields added to new and update.

Version 0.11, August 17, 1999

Added Projects2Pulldown method.

Version 0.1, 14 August 1999

First version of this true Perl module.