Liz::ProjectSet::Project - generic module for Project objects
use xxLINK; $xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $project = $projectset->Project; $project = $projectset->Project( $projectID );
$projectID = $project->update;
Provide object oriented access to the Project object of the Liz::ProjectSet module family. Usually not accessed directly, but rather through a client module.
Create a new Project object from a client module object.
1 Liz::SQL object 2 ID or name to create Project object with 3 clientID for which this project should be created
1 instantiated object
It is not intended to call this method directly, but rather indirectly through a Liz::ProjectSet module.
$xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $project = $projectset->Project; $project = $projectset->Project( 'Project Management',$clientID ); $project = $projectset->Project( $projectID,$clientID );
Update a Project object in the database.
1 ID with which the object was updated (undef = error)
$project->update;
The following methods allow you to change the fields associated with the Liz::ProjectSet::Project object.
Return or set the ClientID of the Liz::ProjectSet::Project object. Its value can be used to create a new Liz::ProjectSet::Client object.
1 new value of ClientID (default: no change)
1 current/old value of ClientID
$project->ClientID( $clientID ); $clientID = $project->ClientID;
Return the Created information of the Liz::ProjectSet::Project object.
1 current timestamp of the Created
$created = $project->Created;
Set or return the Deadline information of the Liz::ProjectSet::Project object.
1 new timestamp for deadline value (default: no change)
1 current/old timestamp of the Deadline
$project->Deadline( $deadline ); $deadline = $project->Deadline;
Return or set the Description of the project of the Liz::ProjectSet::Project object.
1 new contents of Description (default: no change)
1 current/old contents of Description
$project->Description( 'Implementatie van Liz::ProjectSet' ); $description = $project->Description;
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.
1..N new EmployeeIDs
(default: no change)
1..N current/old EmployeeIDs
$project->EmployeeIDs( @employeeID ); @employeeID = $project->EmployeeIDs;
Return or set the History of the project of the Liz::ProjectSet::Project object.
1 new contents of History (default: no change)
1 current/old contents of History
$project->History( $history ); $history = $project->History;
Return or set the InvoiceContactID of the Liz::ProjectSet::Project object.
1 new InvoiceContactID (default: no change)
1 current/old InvoiceContactID
$project->InvoiceContactID( $invoicecontactID ); $invoicecontactID = $project->InvoiceContactID;
Return or set the LeaderID information (the employee ID of the person leading the project) of the Liz::ProjectSet::Project object.
1 new value of LeaderID (default: no change)
1 current/old value of LeaderID
$project->LeaderID( $leaderID ); $leaderID = $project->LeaderID;
Return or set the MainContactID of the Liz::ProjectSet::Project object.
1 new maincontactID (default: no change)
1 current/old maincontactID
$project->MainContactID( $maincontactID ); $maincontactID = $project->MainContactID;
Return or set the Name information of the Liz::ProjectSet::Project object.
1 new value of the Name (default: no change)
1 current/old value of the Name
$project->Name( $name ); $name = $project->Name;
Return or set the ClientID of the Liz::ProjectSet::Project object. Its value can be used to create a new Liz::ProjectSet::Organization object.
1 new value of OrganizationID (default: no change)
1 current/old value of OrganizationID
$project->OrganizationID( $organizationID ); $organizationID = $project->OrganizationID;
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.
1..N new othercontactID's
(default: no change)
1..N current/old othercontactID's
$project->OtherContactIDs( @othercontactID ); @othercontactID = $project->OtherContactIDs;
Return or set the SortName information of the Liz::ProjectSet::Project object.
1 new value of the SortName (default: no change)
1 current/old value of the SortName
$project->SortName( $sortname ); $sortname = $project->SortName;
Return or set the Status information of the Liz::ProjectSet::Project object.
1 new value of the Status (default: no change)
1 current/old value of the Status
$project->Status( 1 ); $status = $project->Status;
Return the Updated information of the Liz::ProjectSet::Project object.
1 current timestamp of the Updated
$updated = $project->Updated;
Specify or return the URL associated with the Liz::ProjectSet::Project object.
1 new value of the URL (default: no change)
1 previous/current version of the URL
$project->URL( $url ); $url = $project->URL;
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.
1 new urlID (default: no change)
1 current/old urlID
$project->URLID( $urlID ); $urlID = $project->URLID;
The following methods return an SQL-statement(-like) handle that allows listing of (a selection of) the objects of a certain type.
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.
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 )
1 SQL-like statement handle (on which method "fetchrow" can be applied)
$result = $projectset->Orders; $result = $projectset->Orders( 'ID,name,leaderID','status=0' );
Elizabeth Mattijsen ( lizperl@INC.nl )
With contributions by:
- Sjoerd Lawende ( sjoerd@xxLINK.nl )
(C) 1998-1999 International Network Consultants
Now, update sets the alteredbyID-field to the current user ID. Now inherits the PROJECTSET from the object.
Added stuff for alteredbyID-field.
Now no longer adds Exporter to ISA: it wasn't necessary.
Added Orders2Pulldown method.
First version of this true Perl module.