|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.integration.client.BOBase
com.primavera.integration.client.bo.BusinessObject
com.primavera.integration.client.bo.base.ProjectPortfolioBase
com.primavera.integration.client.bo.object.ProjectPortfolio
public class ProjectPortfolio
A project portfolio consists of projects grouped together in some way that is meaningful to you. For example, one portfolio might contain projects that are the responsibility of a specific business unit, while another portfolio contains only projects budgeted for the next fiscal year.
There are two types of project portfolios: "Manual" and "Filtered". Manual portfolios contain zero or more projects that were specifically added. Filtered portfolios contain zero or more projects based on a filter that was specified in Primavera's Web application. The list of projects in a filtered portfolio is based on the results of the filter when it was first created. Only manual portfolios can be created through the Integration API, and their list of projects cannot be altered.
To add a project to a manual portfolio, use one of the addProject() or addProjects() methods. Use one of the removeProject() or removeProjects() methods to remove a project from a manual portfolio. These methods will not cause the project(s) to be deleted.
To determine if a project is in this portfolio, use one of the containsProject() methods. The getProjectIds() method will return an array of the ObjectIds of all projects in the portfolio.
To load all or some of the projects contained in this portfolio, use the loadProjects() method.
See Also: Quick reference of ProjectPortfolio fields
Constructor Summary | |
---|---|
ProjectPortfolio(Session session)
Class constructor specifying the Session. |
|
ProjectPortfolio(Session session,
ObjectId objId)
Class constructor specifying the Session and ObjectId of the object. |
|
ProjectPortfolio(Session session,
com.primavera.infr.db.PrmRowSet rowSet,
int iIndex)
Class constructor called internally after objects are retrieved from the server. |
Method Summary | |
---|---|
void |
addProject(ObjectId objId)
Adds a project into the project portfolio. |
void |
addProject(Project project)
Adds a project into the project portfolio. |
void |
addProjects(ObjectId[] objIds)
Adds projects into the project portfolio. |
void |
addProjects(Project[] projects)
Adds projects into the project portfolio. |
boolean |
containsProject(ObjectId objId)
Find out whether the project portfolio contains the specified Project. |
boolean |
containsProject(Project project)
Find out whether the project portfolio contains the specified Project. |
ObjectId |
create()
Creates this ProjectPortfolio object in the database. |
static ObjectId[] |
create(Session session,
ProjectPortfolio[] projectportfolios)
Creates multiple ProjectPortfolio objects in the database. |
void |
delete()
Deletes this ProjectPortfolio object from the database. |
static void |
delete(Session session,
ProjectPortfolio[] projectportfolios)
Deletes multiple ProjectPortfolio objects from the database. |
static java.lang.String[] |
getAllFields()
Gets all fields for this business object. |
java.util.Date |
getCreateDate()
Gets the date this project portfolio was created. |
java.lang.String |
getCreateUser()
Gets the name of the user that created this project portfolio. |
static java.lang.String[] |
getDefaultXMLExportFields()
Gets the fields that are exported by the XML exporter when no fields are specified. |
java.lang.String |
getDescription()
Gets the description of the project portfolio. |
static java.lang.String[] |
getFilterableFields()
Gets all fields that can be filtered. |
boolean |
getIncludeClosedProjects()
Gets the flag that indicates whether closed projects are included in the portfolio. |
boolean |
getIncludeWhatIfProjects()
Gets the flag that indicates whether what-if projects are included in the portfolio. |
static java.lang.String[] |
getInternalAllFields()
An internal method that should not be called directly by client code. |
static java.util.Set<java.lang.String> |
getInternalAllFieldsSet()
An internal method that should not be called directly by client code. |
static java.lang.String[] |
getInternalDefaultLoadFields()
An internal method that should not be called directly by client code. |
java.util.Date |
getLastUpdateDate()
Gets the date this project portfolio was last updated. |
java.lang.String |
getLastUpdateUser()
Gets the name of the user that last updated this project portfolio. |
static java.lang.String[] |
getMinimumXMLExportFields()
Gets all fields that are always exported at a minimum by the new flat XML exporter |
java.lang.String |
getName()
Gets the name of the project portfolio. |
ObjectId |
getObjectId()
Gets the unique ID generated by the system. |
ObjectId[] |
getProjectObjectIds()
Gets an array of project unique IDs contained in the project portfolio. |
static java.lang.String[] |
getRequiredCreateFields()
Gets all fields that must be set before calling create() on this business object. |
PortfolioType |
getType()
Gets the type of the project portfolio: "Manual", "Auto-Maintained", or "Filtered". |
java.lang.String |
getUserName()
Gets the user's login name. |
ObjectId |
getUserObjectId()
Gets the unique ID of a specific user who has access to the selected project portfolio. |
static java.lang.String[] |
getWritableFields()
Gets all writable fields for this business object. |
static ProjectPortfolio |
load(Session session,
java.lang.String[] fields,
ObjectId objId)
Loads a single ProjectPortfolio object from the database. |
static BOIterator<ProjectPortfolio> |
load(Session session,
java.lang.String[] fields,
ObjectId[] objIds)
Loads multiple ProjectPortfolio objects from the database. |
BOIterator<Project> |
loadProjects(java.lang.String[] fields,
java.lang.String sWhereClause,
java.lang.String sOrderBy)
Load the project objects contained in the project portfolio. |
User |
loadUser(java.lang.String[] fields)
Loads an associated User object from the database. |
void |
removeProject(ObjectId objId)
Removes a project from the project portfolio. |
void |
removeProject(Project project)
Removes a project from the project portfolio. |
void |
removeProjects(ObjectId[] objIds)
Removes projects from the project portfolio. |
void |
removeProjects(Project[] projects)
Removes projects from the project portfolio. |
void |
setDescription(java.lang.String s)
Sets the description of the project portfolio. |
void |
setIncludeClosedProjects(boolean b)
Sets the flag that indicates whether closed projects are included in the portfolio. |
void |
setIncludeWhatIfProjects(boolean b)
Sets the flag that indicates whether what-if projects are included in the portfolio. |
void |
setName(java.lang.String s)
Sets the name of the project portfolio. |
void |
setObjectId(ObjectId o)
Sets the unique ID generated by the system. |
void |
setUserObjectId(ObjectId o)
Sets the unique ID of a specific user who has access to the selected project portfolio. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
update()
Updates this ProjectPortfolio object in the database. |
static void |
update(Session session,
ProjectPortfolio[] projectportfolios)
Updates multiple ProjectPortfolio objects in the database. |
Methods inherited from class com.primavera.integration.client.bo.BusinessObject |
---|
equals, hashCode, isNull, setNull |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProjectPortfolio(Session session)
session
- the Sessionpublic ProjectPortfolio(Session session, ObjectId objId) throws BusinessObjectException
session
- the SessionobjId
- the ObjectId
BusinessObjectException
- if a problem occurred in the client-side business objectspublic ProjectPortfolio(Session session, com.primavera.infr.db.PrmRowSet rowSet, int iIndex) throws BusinessObjectException
session
- the SessionrowSet
- the PrmRowSet retrieved from the serveriIndex
- the row index in the PrmRowSet associated with this business object
BusinessObjectException
- if a problem occurred in the client-side business objectsMethod Detail |
---|
public ObjectId create() throws ServerException, NetworkException, BusinessObjectException
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static ObjectId[] create(Session session, ProjectPortfolio[] projectportfolios) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectprojectportfolios
- array of ProjectPortfolio objects to create
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static ProjectPortfolio load(Session session, java.lang.String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjId
- unique ID of the ProjectPortfolio object
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static BOIterator<ProjectPortfolio> load(Session session, java.lang.String[] fields, ObjectId[] objIds) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjIds
- object ids of the ProjectPortfolio objects
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void update() throws ServerException, NetworkException, BusinessObjectException
update
in class BOBase
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void update(Session session, ProjectPortfolio[] projectportfolios) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectprojectportfolios
- array of ProjectPortfolio objects to update
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void delete() throws ServerException, NetworkException, BusinessObjectException
delete
in class BOBase
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void delete(Session session, ProjectPortfolio[] projectportfolios) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectprojectportfolios
- array of ProjectPortfolio objects to delete
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic User loadUser(java.lang.String[] fields) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to load
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void addProject(Project project) throws BusinessObjectException
addProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
project
- Project object
BusinessObjectException
public void addProjects(Project[] projects) throws BusinessObjectException
addProjects
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
projects
- Array of Project objects
BusinessObjectException
public void addProject(ObjectId objId) throws BusinessObjectException
addProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
objId
- unique ID of a Project object
BusinessObjectException
public void addProjects(ObjectId[] objIds) throws BusinessObjectException
addProjects
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
objIds
- Array of Project unique IDs
BusinessObjectException
public void removeProject(Project project) throws BusinessObjectException
removeProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
project
- Project object
BusinessObjectException
public void removeProjects(Project[] projects) throws BusinessObjectException
removeProjects
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
projects
- Array of Project object
BusinessObjectException
public void removeProject(ObjectId objId) throws BusinessObjectException
removeProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
objId
- unique ID of a Project object
BusinessObjectException
public void removeProjects(ObjectId[] objIds) throws BusinessObjectException
removeProjects
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
objIds
- Array of Project unique IDs
BusinessObjectException
public boolean containsProject(Project project) throws BusinessObjectException
containsProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
project
- Project object
BusinessObjectException
public boolean containsProject(ObjectId objId) throws BusinessObjectException
containsProject
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
objId
- unique ID of a Project object
BusinessObjectException
public ObjectId[] getProjectObjectIds() throws BusinessObjectException
getProjectObjectIds
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
BusinessObjectException
public BOIterator<Project> loadProjects(java.lang.String[] fields, java.lang.String sWhereClause, java.lang.String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
loadProjects
in class com.primavera.integration.client.bo.base.ProjectPortfolioBase
fields
- fields to loadsWhereClause
- where clausesOrderBy
- order-by clause
ServerException
NetworkException
BusinessObjectException
public ObjectId getObjectId() throws BusinessObjectException
getObjectId
in class BusinessObject
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setObjectId(ObjectId o) throws BusinessObjectException
setObjectId
in class BusinessObject
o
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic ObjectId getUserObjectId() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setUserObjectId(ObjectId o) throws BusinessObjectException
o
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getName() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setName(java.lang.String s) throws BusinessObjectException
s
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic PortfolioType getType() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic boolean getIncludeClosedProjects() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setIncludeClosedProjects(boolean b) throws BusinessObjectException
b
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic boolean getIncludeWhatIfProjects() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setIncludeWhatIfProjects(boolean b) throws BusinessObjectException
b
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getDescription() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setDescription(java.lang.String s) throws BusinessObjectException
s
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getUserName() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.util.Date getCreateDate() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.util.Date getLastUpdateDate() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getCreateUser() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getLastUpdateUser() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static java.lang.String[] getRequiredCreateFields()
public static java.lang.String[] getFilterableFields()
public static java.lang.String[] getInternalDefaultLoadFields()
public static java.lang.String[] getAllFields()
public static java.lang.String[] getInternalAllFields()
public static java.util.Set<java.lang.String> getInternalAllFieldsSet()
public static java.lang.String[] getWritableFields()
public static java.lang.String[] getDefaultXMLExportFields()
public static java.lang.String[] getMinimumXMLExportFields()
public java.lang.String toString()
toString
in class java.lang.Object
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |