NAME

Liz::ProjectSet::Project - generic module for Project objects


SYNOPSIS

 use xxLINK;
 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 
 $project = $projectset->Project;
 $project = $projectset->Project( $projectID );

 $projectID = $project->update;


DESCRIPTION

Provide object oriented access to the Project object of the Liz::ProjectSet module family. Usually not accessed directly, but rather through a client module.


BASIC METHODS


new

Create a new Project object from a client module object.

Input Parameters

 1 Liz::SQL object
 2 ID or name to create Project object with
 3 clientID for which this project should be created
Output Parameters

 1 instantiated object
Note

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

Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $project = $projectset->Project;
 $project = $projectset->Project( 'Project Management',$clientID );
 $project = $projectset->Project( $projectID,$clientID );


update

Update a Project object in the database.

Output Parameters

 1 ID with which the object was updated (undef = error)
Example

 $project->update;


CONTENT METHODS

The following methods allow you to change the fields associated with the Liz::ProjectSet::Project object.


ClientID

Return or set the ClientID of the Liz::ProjectSet::Project object. Its value can be used to create a new Liz::ProjectSet::Client object.

Input Parameters

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

 1 current/old value of ClientID
Example

 $project->ClientID( $clientID );
 $clientID = $project->ClientID;


Created

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

Output Parameters

 1 current timestamp of the Created
Example

 $created = $project->Created;


Deadline

Set or return the Deadline information of the Liz::ProjectSet::Project object.

Input Parameters

 1 new timestamp for deadline value
   (default: no change)
Output Parameters

 1 current/old timestamp of the Deadline
Example

 $project->Deadline( $deadline );
 $deadline = $project->Deadline;


Description

Return or set the Description of the project of the Liz::ProjectSet::Project object.

Input Parameters

 1 new contents of Description
   (default: no change)
Output Parameters

 1 current/old contents of Description
Example

 $project->Description( 'Implementatie van Liz::ProjectSet' );
 $description = $project->Description;


EmployeeIDs

Return or set the EmployeeIDs associated with the Liz::ProjectSet::Project object. Because the associations are linked to the ID of the project, this method should only be called after the first successful update.

Input Parameters

 1..N new EmployeeIDs
      (default: no change)
Output Parameters

 1..N current/old EmployeeIDs
Example

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


History

Return or set the History of the project of the Liz::ProjectSet::Project object.

Input Parameters

 1 new contents of History
   (default: no change)
Output Parameters

 1 current/old contents of History
Example

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


InvoiceContactID

Return or set the InvoiceContactID of the Liz::ProjectSet::Project object.

Input Parameters

 1 new InvoiceContactID
   (default: no change)
Output Parameters

 1 current/old InvoiceContactID
Example

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


LeaderID

Return or set the LeaderID information (the employee ID of the person leading the project) of the Liz::ProjectSet::Project object.

Input Parameters

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

 1 current/old value of LeaderID
Example

 $project->LeaderID( $leaderID );
 $leaderID = $project->LeaderID;


MainContactID

Return or set the MainContactID of the Liz::ProjectSet::Project object.

Input Parameters

 1 new maincontactID
   (default: no change)
Output Parameters

 1 current/old maincontactID
Example

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


Name

Return or set the Name information of the Liz::ProjectSet::Project object.

Input Parameters

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

 1 current/old value of the Name
Example

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


OrganizationID

Return or set the ClientID of the Liz::ProjectSet::Project object. Its value can be used to create a new Liz::ProjectSet::Organization object.

Input Parameters

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

 1 current/old value of OrganizationID
Example

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


OtherContactIDs

Return or set the OtherContactIDs (list of contactID's) of the Liz::ProjectSet::Project object. Because the associations are linked to the ID of the project, 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

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


SortName

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

Input Parameters

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

 1 current/old value of the SortName
Example

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


Status

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

Input Parameters

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

 1 current/old value of the Status
Example

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


Updated

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

Output Parameters

 1 current timestamp of the Updated
Example

 $updated = $project->Updated;


URL

Specify or return the URL associated with the Liz::ProjectSet::Project object.

Input Parameters

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

 1 previous/current version of the URL
Example

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


URLID

Return or set the URLID of the Liz::ProjectSet::Project object. This is usually only used internally. It is better to use the more transparant method URL instead.

Input Parameters

 1 new urlID
   (default: no change)
Output Parameters

 1 current/old urlID
Example

 $project->URLID( $urlID );
 $urlID = $project->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.


Orders

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

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

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

 deadline
 Timestamp for the deadline of the Order

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

 leaderID
 The ID of the Leader information of the Order.

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

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

 sortname
 The string on which the Order can be sorted.  It usually consists of
 the name field all in lowercase and with all non-alphanumeric characters
 removed.

 projectID
 The ID of the Project information of the Order.  If non-zero, can be
 used to create an L<Project> 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 Order.  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 Order.  If non-zero,
 can be used to create an L<Contact> object with.

 urlID
 The ID of the URL associated with the Order.  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,projectID,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->Orders;
 $result = $projectset->Orders( 'ID,name,leaderID','status=0' );


AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )

With contributions by:

- Sjoerd Lawende ( sjoerd@xxLINK.nl )


COPYRIGHT

(C) 1998-1999 International Network Consultants


HISTORY

Version 0.15, 30 November, 1999

Now, update sets the alteredbyID-field to the current user ID. Now inherits the PROJECTSET from the object.

Version 0.14, 29 November, 1999

Added stuff for alteredbyID-field.

Version 0.13, 30 September 1999

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

Version 0.12, August 20, 1999

Support for extra fields added to new and update

Version 0.11, August 17, 1999

Added Orders2Pulldown method.

Version 0.1, 14 August 1999

First version of this true Perl module.