Primavera Integration API 8.0

com.primavera.integration.client.bo.object
Class Resource

java.lang.Object
  extended by com.primavera.integration.client.BOBase
      extended by com.primavera.integration.client.bo.BusinessObject
          extended by com.primavera.integration.client.bo.base.ResourceBase
              extended by com.primavera.integration.client.bo.object.Resource

public class Resource
extends com.primavera.integration.client.bo.base.ResourceBase

Resources include the personnel and equipment that perform work on activities across all projects. Resources are always time-based and are generally reused between activities and/or projects. You can create a resource pool that reflects your organization's resource structure and supports the assignment of resources to activities. You can also distinguish between labor and nonlabor resources. You can create and assign resource calendars and define a resource's roles, contact information, and time-varying prices. If a resource uses Timesheets, you can also assign a login name and password to the resource.

Define a master list of resources consisting of the resources necessary to complete the projects in your enterprise structure. Then, group resources to create an easily accessible pool from which you can draw when assigning resources to a project. For each resource, set availability limits, unit prices, and a calendar to define its standard worktime and nonworktime, then allocate resources to the activities that require them. To enable grouping and rollups or your resources across the enterprise, set up resource codes and assign code values.

Resources are hierarchical and are different than expenses. While resources are time-based and generally extend across multiple activities and/or projects, expenses are one-time expenditures for non-reusable items required by activities. Expenses are not included when resources are leveled.

A resource may be specified as a primary resource when assigning to activities. An activity's primary resource is typically the resource who is responsible for coordinating an activity's work. Using Timesheets, the primary resource also updates the activity's start date, finish date, and expected end date. In addition, if an activity has any nonlabor resources, the primary resource may also be responsible for reporting the nonlabor resource's hours/units as well. With the exception of nonlabor resources, all other resources are responsible for reporting their own hours for assigned activities.

Resources may be loaded with summarized project resource spreads using the loadWithProjectResourceSpread() method. All projects must have been previously summarized using the summarizer job service. The ObjectId(s) of the project(s) are normally specified for which to load the project resource spreads. If no project ObjectIds are specified, project resource spreads are loaded for all projects to which the resource is assigned. After loading, call the getProjectResourceSpreads() method to access the spread data.

This business object supports user defined fields (UDFs) and codes. Use the UDFValue business object to assign UDFs, and the ResourceCodeAssignment business object to assign ResourceCodes.

See Also:   Quick reference of Resource fields


Constructor Summary
Resource(Session session)
          Class constructor specifying the Session.
Resource(Session session, ObjectId objId)
          Class constructor specifying the Session and ObjectId of the object.
Resource(Session session, com.primavera.infr.db.PrmRowSet rowSet, int iIndex)
          Class constructor called internally after objects are retrieved from the server.
 
Method Summary
 ObjectId create()
          Creates this Resource object in the database.
static ObjectId[] create(Session session, Resource[] resources)
          Creates multiple Resource objects in the database.
 ObjectId createResourceAssignment(ResourceAssignment resourceassignment)
          Creates an associated ResourceAssignment object in the database.
 ObjectId[] createResourceAssignments(ResourceAssignment[] resourceassignments)
          Creates multiple associated ResourceAssignment objects in the database.
 ObjectId createResourceChild(Resource resourcechild)
          Creates an associated Resource object in the database.
 ObjectId[] createResourceChildren(Resource[] resourcechildren)
          Creates multiple associated Resource objects in the database.
 ObjectId createResourceRate(ResourceRate resourcerate)
          Creates an associated ResourceRate object in the database.
 ObjectId[] createResourceRates(ResourceRate[] resourcerates)
          Creates multiple associated ResourceRate objects in the database.
 void delete()
          Deletes this Resource object from the database.
 void delete(ObjectId replacementId)
          Deletes this Resource object from the database.
static void delete(Session session, Resource[] resources)
          Deletes multiple Resource objects from the database.
static void delete(Session session, Resource[] resources, ObjectId replacementParent)
          Deletes multiple resource objects in a hierarchy from the database and set the new parent of all child objects.
static String[] getAllFields()
          Gets all non-code fields for this business object.
 boolean getAutoComputeActuals()
          Gets the flag that identifies whether the activity actual and remaining units, start dates and finish dates for the resource are computed automatically using the planned dates, planned units and the activity's schedule percent complete.
 boolean getCalculateCostFromUnits()
          Gets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.
 String getCalendarName()
          Gets the name of the calendar.
 ObjectId getCalendarObjectId()
          Gets the unique ID of the calendar assigned to the resource.
 Date getCreateDate()
          Gets the date this resource was created.
 String getCreateUser()
          Gets the name of the user that created this resource.
 String getCurrencyId()
          Gets the unique currency abbreviation for the currency associated with this resource.
 String getCurrencyName()
          Gets the name of the currency associated with this resource.
 ObjectId getCurrencyObjectId()
          Gets the unique ID of the currency associated with this resource.
 UnitsPerTime getDefaultUnitsPerTime()
          Gets the default units/time setting, which determines the value of the remaining units/time and planned units/time when a resource assignment is added.
static String[] getDefaultXMLExportFields()
          Gets the fields that are exported by the XML exporter when no fields are specified.
 BeginDate getEffectiveDate()
          Gets the earliest day when the resource becomes overallocated, calculated during the summarization.
 String getEmailAddress()
          Gets the e-mail address for the resource.
 String getEmployeeId()
          Gets the resource identifier within the organization, typically the employee number or social security number.
static String[] getFilterableFields()
          Gets all fields that can be filtered.
 String getGUID()
          Gets the globally unique ID generated by the system.
 String getId()
          Gets the short code that uniquely identifies the resource.
 IntegratedObjectType getIntegratedType()
          Gets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system.
static String[] getInternalAllFields()
          An internal method that should not be called directly by client code.
static Set<String> getInternalAllFieldsSet()
          An internal method that should not be called directly by client code.
static String[] getInternalDefaultLoadFields()
          An internal method that should not be called directly by client code.
 boolean getIsActive()
          Gets the flag that indicates whether the resource is currently active.
 boolean getIsOverTimeAllowed()
          Gets the flag that indicates whether the resource is allowed to log overtime hours.
 Date getLastUpdateDate()
          Gets the date this resource was last updated.
 String getLastUpdateUser()
          Gets the name of the user that last updated this resource.
static String[] getMainFields()
          Gets all fields in the main group for this business object.
 UnitsPerTime getMaxUnitsPerTime()
          Gets the maximum work units per time this resource can perform on all their assigned activities.
static String[] getMinimumXMLExportFields()
          Gets all fields that are always exported at a minimum by the new flat XML exporter
 String getName()
          Gets the name of the resource.
 ObjectId getObjectId()
          Gets the unique ID generated by the system.
 String getOfficePhone()
          Gets the office phone number for the resource.
 String getOtherPhone()
          Gets the other phone numbers for the resource - pager, home phone, cell phone, etc.
 double getOvertimeFactor()
          Gets the overtime factor used to compute the overtime price for the resource.
 ObjectId getParentObjectId()
          Gets the unique ID of the parent resource of this resource in the hierarchy.
 Cost getPricePerUnit()
          Gets the planned price per unit for the project expense.
 String getPrimaryRoleId()
          Gets the short code that uniquely identifies the primary role for this resource.
 String getPrimaryRoleName()
          Gets the name of the primary role for this resource.
 ObjectId getPrimaryRoleObjectId()
          Gets the unique ID of the role that is assigned as the resource's primary role.
 ProjectResourceSpread[] getProjectResourceSpreads()
          Gets the field containing project spread data for this resource.
static String[] getRequiredCreateFields()
          Gets all fields that must be set before calling create() on this business object.
 String getResourceNotes()
          Gets the notes about the resource.
static String[] getResourceSpreadFields()
          Gets all spread fields that can be specified in the spreadFields parameter of loadWithResourceSpread methods for this business object.
 ResourceType getResourceType()
          Gets the resource type: "Labor", "Nonlabor", or "Material".
 int getSequenceNumber()
          Gets the sequence number for sorting.
 ObjectId getShiftObjectId()
          Gets the unique ID of the shift associated with the resource.
 String getTimesheetApprovalManager()
          Gets the resource manager assigned to approve timesheets for the resource.
 ObjectId getTimesheetApprovalManagerObjectId()
          Gets the unique ID of the resource manager assigned to approve timesheets for the resource.
 String getTitle()
          Gets the title of the resource.
 ObjectId getUnitOfMeasureObjectId()
          Gets the unit of measure this material resource uses.
 String getUserName()
          Gets the user's login name.
 ObjectId getUserObjectId()
          Gets the unique ID of the associated user.
 boolean getUseTimesheets()
          Gets the flag that indicates whether the resource uses timesheets.
static String[] getWritableFields()
          Gets all writable fields for this business object.
static Resource load(Session session, String[] fields, ObjectId objId)
          Loads a single Resource object from the database.
static BOIterator<Resource> load(Session session, String[] fields, ObjectId[] objIds)
          Loads multiple Resource objects from the database.
 BOIterator<Activity> loadActivities(String[] fields, String sWhereClause, String sOrderBy)
          Load the Activity objects to which this Resource is assigned as a ResourceAssignment.
 Calendar loadCalendar(String[] fields)
          Loads an associated Calendar object from the database.
 Currency loadCurrency(String[] fields)
          Loads an associated Currency object from the database.
 BOIterator<Document> loadDocuments(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated Document objects from the database.
 Resource loadParentResource(String[] fields)
          Loads an associated Resource object from the database.
 Role loadPrimaryRole(String[] fields)
          Loads an associated Role object from the database.
 BOIterator<ProjectIssue> loadProjectIssues(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ProjectIssue objects from the database.
 BOIterator<ProjectResource> loadProjectResources(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ProjectResource objects from the database.
 BOIterator<ResourceAccess> loadResourceAccess(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceAccess objects from the database.
 BOIterator<ResourceAssignment> loadResourceAssignments(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceAssignment objects from the database.
 BOIterator<ResourceAssignment> loadResourceAssignmentsWithLiveSpread(String[] nonSpreadFields, String sWhereClause, String sOrderBy, String[] spreadFields, SpreadPeriodType periodType, Date startDate, Date endDate, boolean bIncludeCumulative)
          Loads multiple associated ResourceAssignment objects with spreads from the database.
 BOIterator<Resource> loadResourceChildren(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated Resource objects from the database.
 BOIterator<ResourceCodeAssignment> loadResourceCodeAssignments(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceCodeAssignment objects from the database.
 BOIterator<ResourceHour> loadResourceHours(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceHour objects from the database.
 BOIterator<ResourceRate> loadResourceRates(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceRate objects from the database.
 BOIterator<ResourceRole> loadResourceRoles(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated ResourceRole objects from the database.
 BOIterator<Risk> loadRisks(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated Risk objects from the database.
static BOIterator<Resource> loadRootResources(Session session, String[] fields)
          Loads the root Resource objects from the database.
 Shift loadShift(String[] fields)
          Loads an associated Shift object from the database.
 User loadTimesheetApprovalManager(String[] fields)
          Loads an associated User object from the database.
 BOIterator<Timesheet> loadTimesheets(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated Timesheet objects from the database.
 BOIterator<UDFValue> loadUDFValues(String[] fields, String sWhereClause, String sOrderBy)
          Loads multiple associated UDFValue objects from the database.
 UnitOfMeasure loadUnitOfMeasure(String[] fields)
          Loads an associated UnitOfMeasure object from the database.
 User loadUser(String[] fields)
          Loads an associated User object from the database.
static BOIterator<Resource> loadWithProjectResourceSpread(Session session, String[] nonSpreadFields, ObjectId[] objIds, String[] spreadFields, SpreadPeriodType periodType, Date startDate, Date endDate, boolean bIncludeCumulative, ObjectId[] projectObjectIds)
          Loads multiple Resource objects with summarized spreads from the database.
static Resource loadWithProjectResourceSpread(Session session, String[] nonSpreadFields, ObjectId objId, String[] spreadFields, SpreadPeriodType periodType, Date startDate, Date endDate, boolean bIncludeCumulative, ObjectId[] projectObjectIds)
          Loads a Resource object with summarized spreads from the database.
 void setAutoComputeActuals(boolean b)
          Sets the flag that identifies whether the activity actual and remaining units, start dates and finish dates for the resource are computed automatically using the planned dates, planned units and the activity's schedule percent complete.
 void setCalculateCostFromUnits(boolean b)
          Sets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.
 void setCalendarObjectId(ObjectId o)
          Sets the unique ID of the calendar assigned to the resource.
 void setCurrencyObjectId(ObjectId o)
          Sets the unique ID of the currency associated with this resource.
 void setDefaultUnitsPerTime(UnitsPerTime d)
          Sets the default units/time setting, which determines the value of the remaining units/time and planned units/time when a resource assignment is added.
 void setEmailAddress(String s)
          Sets the e-mail address for the resource.
 void setEmployeeId(String s)
          Sets the resource identifier within the organization, typically the employee number or social security number.
 void setGUID(String s)
          Sets the globally unique ID generated by the system.
 void setId(String s)
          Sets the short code that uniquely identifies the resource.
 void setIntegratedType(IntegratedObjectType enm)
          Sets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system.
 void setIsActive(boolean b)
          Sets the flag that indicates whether the resource is currently active.
 void setIsOverTimeAllowed(boolean b)
          Sets the flag that indicates whether the resource is allowed to log overtime hours.
 void setName(String s)
          Sets the name of the resource.
 void setObjectId(ObjectId o)
          Sets the unique ID generated by the system.
 void setOfficePhone(String s)
          Sets the office phone number for the resource.
 void setOtherPhone(String s)
          Sets the other phone numbers for the resource - pager, home phone, cell phone, etc.
 void setOvertimeFactor(double d)
          Sets the overtime factor used to compute the overtime price for the resource.
 void setParentObjectId(ObjectId o)
          Sets the unique ID of the parent resource of this resource in the hierarchy.
 void setPrimaryRoleObjectId(ObjectId o)
          Sets the unique ID of the role that is assigned as the resource's primary role.
 void setResourceNotes(String s)
          Sets the notes about the resource.
 void setResourceType(ResourceType enm)
          Sets the resource type: "Labor", "Nonlabor", or "Material".
 void setSequenceNumber(int i)
          Sets the sequence number for sorting.
 void setShiftObjectId(ObjectId o)
          Sets the unique ID of the shift associated with the resource.
 void setTimesheetApprovalManagerObjectId(ObjectId o)
          Sets the unique ID of the resource manager assigned to approve timesheets for the resource.
 void setTitle(String s)
          Sets the title of the resource.
 void setUnitOfMeasureObjectId(ObjectId o)
          Sets the unit of measure this material resource uses.
 void setUserObjectId(ObjectId o)
          Sets the unique ID of the associated user.
 void setUseTimesheets(boolean b)
          Sets the flag that indicates whether the resource uses timesheets.
 String toString()
          Returns a string representation of the object.
 void update()
          Updates this Resource object in the database.
static void update(Session session, Resource[] resources)
          Updates multiple Resource 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

Resource

public Resource(Session session)
Class constructor specifying the Session. This constructor is most commonly used when create() is intended to be called on this object.

Parameters:
session - the Session

Resource

public Resource(Session session,
                ObjectId objId)
         throws BusinessObjectException
Class constructor specifying the Session and ObjectId of the object. This constructor is most commonly used when update() will be called on this object.

Parameters:
session - the Session
objId - the ObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

Resource

public Resource(Session session,
                com.primavera.infr.db.PrmRowSet rowSet,
                int iIndex)
         throws BusinessObjectException
Class constructor called internally after objects are retrieved from the server. Client code should use one of the other constructors for this class.

Parameters:
session - the Session
rowSet - the PrmRowSet retrieved from the server
iIndex - the row index in the PrmRowSet associated with this business object
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects
Method Detail

createResourceAssignment

public ObjectId createResourceAssignment(ResourceAssignment resourceassignment)
                                  throws ServerException,
                                         NetworkException,
                                         BusinessObjectException
Creates an associated ResourceAssignment object in the database.

Parameters:
resourceassignment - ResourceAssignment object to create
Returns:
ObjectId unique ID of the newly created ResourceAssignment object
Throws:
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 objects

createResourceAssignments

public ObjectId[] createResourceAssignments(ResourceAssignment[] resourceassignments)
                                     throws ServerException,
                                            NetworkException,
                                            BusinessObjectException
Creates multiple associated ResourceAssignment objects in the database.

Parameters:
resourceassignments - array of ResourceAssignment objects to create
Returns:
ObjectId[] array of object ids of newly created ResourceAssignment objects
Throws:
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 objects

loadResourceAssignments

public BOIterator<ResourceAssignment> loadResourceAssignments(String[] fields,
                                                              String sWhereClause,
                                                              String sOrderBy)
                                                       throws ServerException,
                                                              NetworkException,
                                                              BusinessObjectException
Loads multiple associated ResourceAssignment objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadResourceAssignmentsWithLiveSpread

public BOIterator<ResourceAssignment> loadResourceAssignmentsWithLiveSpread(String[] nonSpreadFields,
                                                                            String sWhereClause,
                                                                            String sOrderBy,
                                                                            String[] spreadFields,
                                                                            SpreadPeriodType periodType,
                                                                            Date startDate,
                                                                            Date endDate,
                                                                            boolean bIncludeCumulative)
                                                                     throws ServerException,
                                                                            NetworkException,
                                                                            BusinessObjectException
Loads multiple associated ResourceAssignment objects with spreads from the database.

Parameters:
nonSpreadFields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
spreadFields - the fields to include in the spread object
periodType - the period of the spread data (hour, day, etc.)
startDate - the start date of the spread
endDate - the end date of the spread
bIncludeCumulative - indicates whether to include cumulative spread data
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadParentResource

public Resource loadParentResource(String[] fields)
                            throws ServerException,
                                   NetworkException,
                                   BusinessObjectException
Loads an associated Resource object from the database.

Parameters:
fields - fields to load
Returns:
Resource the Resource object
Throws:
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 objects

createResourceChild

public ObjectId createResourceChild(Resource resourcechild)
                             throws ServerException,
                                    NetworkException,
                                    BusinessObjectException
Creates an associated Resource object in the database.

Parameters:
resourcechild - ResourceChild object to create
Returns:
ObjectId unique ID of the newly created Resource object
Throws:
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 objects

createResourceChildren

public ObjectId[] createResourceChildren(Resource[] resourcechildren)
                                  throws ServerException,
                                         NetworkException,
                                         BusinessObjectException
Creates multiple associated Resource objects in the database.

Parameters:
resourcechildren - array of ResourceChild objects to create
Returns:
ObjectId[] array of object ids of newly created Resource objects
Throws:
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 objects

loadResourceChildren

public BOIterator<Resource> loadResourceChildren(String[] fields,
                                                 String sWhereClause,
                                                 String sOrderBy)
                                          throws ServerException,
                                                 NetworkException,
                                                 BusinessObjectException
Loads multiple associated Resource objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadRootResources

public static BOIterator<Resource> loadRootResources(Session session,
                                                     String[] fields)
                                              throws ServerException,
                                                     NetworkException,
                                                     BusinessObjectException
Loads the root Resource objects from the database.

Parameters:
session - the Session object
fields - fields to load
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadPrimaryRole

public Role loadPrimaryRole(String[] fields)
                     throws ServerException,
                            NetworkException,
                            BusinessObjectException
Loads an associated Role object from the database.

Parameters:
fields - fields to load
Returns:
Role the Role object
Throws:
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 objects

loadCurrency

public Currency loadCurrency(String[] fields)
                      throws ServerException,
                             NetworkException,
                             BusinessObjectException
Loads an associated Currency object from the database.

Parameters:
fields - fields to load
Returns:
Currency the Currency object
Throws:
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 objects

loadCalendar

public Calendar loadCalendar(String[] fields)
                      throws ServerException,
                             NetworkException,
                             BusinessObjectException
Loads an associated Calendar object from the database.

Parameters:
fields - fields to load
Returns:
Calendar the Calendar object
Throws:
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 objects

loadUser

public User loadUser(String[] fields)
              throws ServerException,
                     NetworkException,
                     BusinessObjectException
Loads an associated User object from the database.

Parameters:
fields - fields to load
Returns:
User the User object
Throws:
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 objects

loadShift

public Shift loadShift(String[] fields)
                throws ServerException,
                       NetworkException,
                       BusinessObjectException
Loads an associated Shift object from the database.

Parameters:
fields - fields to load
Returns:
Shift the Shift object
Throws:
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 objects

loadResourceRoles

public BOIterator<ResourceRole> loadResourceRoles(String[] fields,
                                                  String sWhereClause,
                                                  String sOrderBy)
                                           throws ServerException,
                                                  NetworkException,
                                                  BusinessObjectException
Loads multiple associated ResourceRole objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadResourceAccess

public BOIterator<ResourceAccess> loadResourceAccess(String[] fields,
                                                     String sWhereClause,
                                                     String sOrderBy)
                                              throws ServerException,
                                                     NetworkException,
                                                     BusinessObjectException
Loads multiple associated ResourceAccess objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadTimesheetApprovalManager

public User loadTimesheetApprovalManager(String[] fields)
                                  throws ServerException,
                                         NetworkException,
                                         BusinessObjectException
Loads an associated User object from the database.

Parameters:
fields - fields to load
Returns:
User the User object
Throws:
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 objects

loadProjectIssues

public BOIterator<ProjectIssue> loadProjectIssues(String[] fields,
                                                  String sWhereClause,
                                                  String sOrderBy)
                                           throws ServerException,
                                                  NetworkException,
                                                  BusinessObjectException
Loads multiple associated ProjectIssue objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadResourceHours

public BOIterator<ResourceHour> loadResourceHours(String[] fields,
                                                  String sWhereClause,
                                                  String sOrderBy)
                                           throws ServerException,
                                                  NetworkException,
                                                  BusinessObjectException
Loads multiple associated ResourceHour objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

createResourceRate

public ObjectId createResourceRate(ResourceRate resourcerate)
                            throws ServerException,
                                   NetworkException,
                                   BusinessObjectException
Creates an associated ResourceRate object in the database.

Parameters:
resourcerate - ResourceRate object to create
Returns:
ObjectId unique ID of the newly created ResourceRate object
Throws:
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 objects

createResourceRates

public ObjectId[] createResourceRates(ResourceRate[] resourcerates)
                               throws ServerException,
                                      NetworkException,
                                      BusinessObjectException
Creates multiple associated ResourceRate objects in the database.

Parameters:
resourcerates - array of ResourceRate objects to create
Returns:
ObjectId[] array of object ids of newly created ResourceRate objects
Throws:
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 objects

loadResourceRates

public BOIterator<ResourceRate> loadResourceRates(String[] fields,
                                                  String sWhereClause,
                                                  String sOrderBy)
                                           throws ServerException,
                                                  NetworkException,
                                                  BusinessObjectException
Loads multiple associated ResourceRate objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadTimesheets

public BOIterator<Timesheet> loadTimesheets(String[] fields,
                                            String sWhereClause,
                                            String sOrderBy)
                                     throws ServerException,
                                            NetworkException,
                                            BusinessObjectException
Loads multiple associated Timesheet objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadUnitOfMeasure

public UnitOfMeasure loadUnitOfMeasure(String[] fields)
                                throws ServerException,
                                       NetworkException,
                                       BusinessObjectException
Loads an associated UnitOfMeasure object from the database.

Parameters:
fields - fields to load
Returns:
UnitOfMeasure the UnitOfMeasure object
Throws:
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 objects

loadDocuments

public BOIterator<Document> loadDocuments(String[] fields,
                                          String sWhereClause,
                                          String sOrderBy)
                                   throws ServerException,
                                          NetworkException,
                                          BusinessObjectException
Loads multiple associated Document objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadProjectResources

public BOIterator<ProjectResource> loadProjectResources(String[] fields,
                                                        String sWhereClause,
                                                        String sOrderBy)
                                                 throws ServerException,
                                                        NetworkException,
                                                        BusinessObjectException
Loads multiple associated ProjectResource objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadResourceCodeAssignments

public BOIterator<ResourceCodeAssignment> loadResourceCodeAssignments(String[] fields,
                                                                      String sWhereClause,
                                                                      String sOrderBy)
                                                               throws ServerException,
                                                                      NetworkException,
                                                                      BusinessObjectException
Loads multiple associated ResourceCodeAssignment objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadRisks

public BOIterator<Risk> loadRisks(String[] fields,
                                  String sWhereClause,
                                  String sOrderBy)
                           throws ServerException,
                                  NetworkException,
                                  BusinessObjectException
Loads multiple associated Risk objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadUDFValues

public BOIterator<UDFValue> loadUDFValues(String[] fields,
                                          String sWhereClause,
                                          String sOrderBy)
                                   throws ServerException,
                                          NetworkException,
                                          BusinessObjectException
Loads multiple associated UDFValue objects from the database.

Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order-by clause
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadActivities

public BOIterator<Activity> loadActivities(String[] fields,
                                           String sWhereClause,
                                           String sOrderBy)
                                    throws ServerException,
                                           NetworkException,
                                           BusinessObjectException
Load the Activity objects to which this Resource is assigned as a ResourceAssignment.

Overrides:
loadActivities in class com.primavera.integration.client.bo.base.ResourceBase
Parameters:
fields - fields to load
sWhereClause - where clause
sOrderBy - order by clause
Returns:
iterator of Activity objects
Throws:
ServerException
NetworkException
BusinessObjectException

getObjectId

public ObjectId getObjectId()
                     throws BusinessObjectException
Gets the unique ID generated by the system. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Overrides:
getObjectId in class BusinessObject
Returns:
the value in the field ObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setObjectId

public void setObjectId(ObjectId o)
                 throws BusinessObjectException
Sets the unique ID generated by the system. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Overrides:
setObjectId in class BusinessObject
Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getParentObjectId

public ObjectId getParentObjectId()
                           throws BusinessObjectException
Gets the unique ID of the parent resource of this resource in the hierarchy. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field ParentObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setParentObjectId

public void setParentObjectId(ObjectId o)
                       throws BusinessObjectException
Sets the unique ID of the parent resource of this resource in the hierarchy. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getSequenceNumber

public int getSequenceNumber()
                      throws BusinessObjectException
Gets the sequence number for sorting.

Returns:
the value in the field SequenceNumber
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setSequenceNumber

public void setSequenceNumber(int i)
                       throws BusinessObjectException
Sets the sequence number for sorting.

Parameters:
i - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getPrimaryRoleObjectId

public ObjectId getPrimaryRoleObjectId()
                                throws BusinessObjectException
Gets the unique ID of the role that is assigned as the resource's primary role. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field PrimaryRoleObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setPrimaryRoleObjectId

public void setPrimaryRoleObjectId(ObjectId o)
                            throws BusinessObjectException
Sets the unique ID of the role that is assigned as the resource's primary role. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCalendarObjectId

public ObjectId getCalendarObjectId()
                             throws BusinessObjectException
Gets the unique ID of the calendar assigned to the resource. Resource calendars can be assigned from the global calendar pool or the resource calendar pool. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field CalendarObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setCalendarObjectId

public void setCalendarObjectId(ObjectId o)
                         throws BusinessObjectException
Sets the unique ID of the calendar assigned to the resource. Resource calendars can be assigned from the global calendar pool or the resource calendar pool. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCurrencyObjectId

public ObjectId getCurrencyObjectId()
                             throws BusinessObjectException
Gets the unique ID of the currency associated with this resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field CurrencyObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setCurrencyObjectId

public void setCurrencyObjectId(ObjectId o)
                         throws BusinessObjectException
Sets the unique ID of the currency associated with this resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getUserObjectId

public ObjectId getUserObjectId()
                         throws BusinessObjectException
Gets the unique ID of the associated user. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field UserObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setUserObjectId

public void setUserObjectId(ObjectId o)
                     throws BusinessObjectException
Sets the unique ID of the associated user. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getShiftObjectId

public ObjectId getShiftObjectId()
                          throws BusinessObjectException
Gets the unique ID of the shift associated with the resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field ShiftObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setShiftObjectId

public void setShiftObjectId(ObjectId o)
                      throws BusinessObjectException
Sets the unique ID of the shift associated with the resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getTimesheetApprovalManagerObjectId

public ObjectId getTimesheetApprovalManagerObjectId()
                                             throws BusinessObjectException
Gets the unique ID of the resource manager assigned to approve timesheets for the resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field TimesheetApprovalManagerObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setTimesheetApprovalManagerObjectId

public void setTimesheetApprovalManagerObjectId(ObjectId o)
                                         throws BusinessObjectException
Sets the unique ID of the resource manager assigned to approve timesheets for the resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getUnitOfMeasureObjectId

public ObjectId getUnitOfMeasureObjectId()
                                  throws BusinessObjectException
Gets the unit of measure this material resource uses. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Returns:
the value in the field UnitOfMeasureObjectId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setUnitOfMeasureObjectId

public void setUnitOfMeasureObjectId(ObjectId o)
                              throws BusinessObjectException
Sets the unit of measure this material resource uses. This field is automatically loaded by default whenever this type of business object is loaded from the database.

Parameters:
o - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getId

public String getId()
             throws BusinessObjectException
Gets the short code that uniquely identifies the resource.

Returns:
the value in the field Id
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setId

public void setId(String s)
           throws BusinessObjectException
Sets the short code that uniquely identifies the resource.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getName

public String getName()
               throws BusinessObjectException
Gets the name of the resource.

Returns:
the value in the field Name
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setName

public void setName(String s)
             throws BusinessObjectException
Sets the name of the resource.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getTitle

public String getTitle()
                throws BusinessObjectException
Gets the title of the resource.

Returns:
the value in the field Title
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setTitle

public void setTitle(String s)
              throws BusinessObjectException
Sets the title of the resource.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getIsActive

public boolean getIsActive()
                    throws BusinessObjectException
Gets the flag that indicates whether the resource is currently active. Non-active resources may have left the organization but are not deleted from the system since they may have actual hours.

Returns:
the value in the field IsActive
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setIsActive

public void setIsActive(boolean b)
                 throws BusinessObjectException
Sets the flag that indicates whether the resource is currently active. Non-active resources may have left the organization but are not deleted from the system since they may have actual hours.

Parameters:
b - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getAutoComputeActuals

public boolean getAutoComputeActuals()
                              throws BusinessObjectException
Gets the flag that identifies whether the activity actual and remaining units, start dates and finish dates for the resource are computed automatically using the planned dates, planned units and the activity's schedule percent complete. If this option is selected, the actual/remaining units and actual dates are automatically updated when project actuals are applied. This assumes that all work by the resource proceeds according to plan.

Returns:
the value in the field AutoComputeActuals
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setAutoComputeActuals

public void setAutoComputeActuals(boolean b)
                           throws BusinessObjectException
Sets the flag that identifies whether the activity actual and remaining units, start dates and finish dates for the resource are computed automatically using the planned dates, planned units and the activity's schedule percent complete. If this option is selected, the actual/remaining units and actual dates are automatically updated when project actuals are applied. This assumes that all work by the resource proceeds according to plan.

Parameters:
b - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getIsOverTimeAllowed

public boolean getIsOverTimeAllowed()
                             throws BusinessObjectException
Gets the flag that indicates whether the resource is allowed to log overtime hours.

Returns:
the value in the field IsOverTimeAllowed
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setIsOverTimeAllowed

public void setIsOverTimeAllowed(boolean b)
                          throws BusinessObjectException
Sets the flag that indicates whether the resource is allowed to log overtime hours.

Parameters:
b - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getUseTimesheets

public boolean getUseTimesheets()
                         throws BusinessObjectException
Gets the flag that indicates whether the resource uses timesheets.

Returns:
the value in the field UseTimesheets
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setUseTimesheets

public void setUseTimesheets(boolean b)
                      throws BusinessObjectException
Sets the flag that indicates whether the resource uses timesheets.

Parameters:
b - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getResourceType

public ResourceType getResourceType()
                             throws BusinessObjectException
Gets the resource type: "Labor", "Nonlabor", or "Material".

Returns:
the value in the field ResourceType
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setResourceType

public void setResourceType(ResourceType enm)
                     throws BusinessObjectException
Sets the resource type: "Labor", "Nonlabor", or "Material".

Parameters:
enm - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCalculateCostFromUnits

public boolean getCalculateCostFromUnits()
                                  throws BusinessObjectException
Gets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.

Returns:
the value in the field CalculateCostFromUnits
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setCalculateCostFromUnits

public void setCalculateCostFromUnits(boolean b)
                               throws BusinessObjectException
Sets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.

Parameters:
b - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getEmailAddress

public String getEmailAddress()
                       throws BusinessObjectException
Gets the e-mail address for the resource.

Returns:
the value in the field EmailAddress
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setEmailAddress

public void setEmailAddress(String s)
                     throws BusinessObjectException
Sets the e-mail address for the resource.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getEmployeeId

public String getEmployeeId()
                     throws BusinessObjectException
Gets the resource identifier within the organization, typically the employee number or social security number.

Returns:
the value in the field EmployeeId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setEmployeeId

public void setEmployeeId(String s)
                   throws BusinessObjectException
Sets the resource identifier within the organization, typically the employee number or social security number.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getOfficePhone

public String getOfficePhone()
                      throws BusinessObjectException
Gets the office phone number for the resource.

Returns:
the value in the field OfficePhone
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setOfficePhone

public void setOfficePhone(String s)
                    throws BusinessObjectException
Sets the office phone number for the resource.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getOtherPhone

public String getOtherPhone()
                     throws BusinessObjectException
Gets the other phone numbers for the resource - pager, home phone, cell phone, etc.

Returns:
the value in the field OtherPhone
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setOtherPhone

public void setOtherPhone(String s)
                   throws BusinessObjectException
Sets the other phone numbers for the resource - pager, home phone, cell phone, etc.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getDefaultUnitsPerTime

public UnitsPerTime getDefaultUnitsPerTime()
                                    throws BusinessObjectException
Gets the default units/time setting, which determines the value of the remaining units/time and planned units/time when a resource assignment is added.

Returns:
the value in the field DefaultUnitsPerTime
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setDefaultUnitsPerTime

public void setDefaultUnitsPerTime(UnitsPerTime d)
                            throws BusinessObjectException
Sets the default units/time setting, which determines the value of the remaining units/time and planned units/time when a resource assignment is added.

Parameters:
d - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getOvertimeFactor

public double getOvertimeFactor()
                         throws BusinessObjectException
Gets the overtime factor used to compute the overtime price for the resource.

Returns:
the value in the field OvertimeFactor
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setOvertimeFactor

public void setOvertimeFactor(double d)
                       throws BusinessObjectException
Sets the overtime factor used to compute the overtime price for the resource.

Parameters:
d - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getGUID

public String getGUID()
               throws BusinessObjectException
Gets the globally unique ID generated by the system.

Returns:
the value in the field GUID
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setGUID

public void setGUID(String s)
             throws BusinessObjectException
Sets the globally unique ID generated by the system.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getResourceNotes

public String getResourceNotes()
                        throws BusinessObjectException
Gets the notes about the resource. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field ResourceNotes
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setResourceNotes

public void setResourceNotes(String s)
                      throws BusinessObjectException
Sets the notes about the resource. This field may not be included in the where clause or order by clause specified when loading business objects.

Parameters:
s - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getIntegratedType

public IntegratedObjectType getIntegratedType()
                                       throws BusinessObjectException
Gets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system. 'Fusion' indicates the resource is integrated with Oracle Fusion. 'ERP' indicates the resource is integrated with another ERP system.

Returns:
the value in the field IntegratedType
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

setIntegratedType

public void setIntegratedType(IntegratedObjectType enm)
                       throws BusinessObjectException
Sets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system. 'Fusion' indicates the resource is integrated with Oracle Fusion. 'ERP' indicates the resource is integrated with another ERP system.

Parameters:
enm - the value to set this field to
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getPrimaryRoleName

public String getPrimaryRoleName()
                          throws BusinessObjectException
Gets the name of the primary role for this resource.

Returns:
the value in the field PrimaryRoleName
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getPrimaryRoleId

public String getPrimaryRoleId()
                        throws BusinessObjectException
Gets the short code that uniquely identifies the primary role for this resource.

Returns:
the value in the field PrimaryRoleId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getUserName

public String getUserName()
                   throws BusinessObjectException
Gets the user's login name.

Returns:
the value in the field UserName
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCalendarName

public String getCalendarName()
                       throws BusinessObjectException
Gets the name of the calendar.

Returns:
the value in the field CalendarName
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCurrencyId

public String getCurrencyId()
                     throws BusinessObjectException
Gets the unique currency abbreviation for the currency associated with this resource.

Returns:
the value in the field CurrencyId
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCurrencyName

public String getCurrencyName()
                       throws BusinessObjectException
Gets the name of the currency associated with this resource.

Returns:
the value in the field CurrencyName
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getTimesheetApprovalManager

public String getTimesheetApprovalManager()
                                   throws BusinessObjectException
Gets the resource manager assigned to approve timesheets for the resource. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field TimesheetApprovalManager
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getMaxUnitsPerTime

public UnitsPerTime getMaxUnitsPerTime()
                                throws BusinessObjectException
Gets the maximum work units per time this resource can perform on all their assigned activities. For example, a person working full time could perform 8 hours of work per day. A department of five people may perform at 5 days per day. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field MaxUnitsPerTime
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getEffectiveDate

public BeginDate getEffectiveDate()
                           throws BusinessObjectException
Gets the earliest day when the resource becomes overallocated, calculated during the summarization. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field EffectiveDate
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getPricePerUnit

public Cost getPricePerUnit()
                     throws BusinessObjectException
Gets the planned price per unit for the project expense. This number is multiplied by the planned number of units to compute the planned cost. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field PricePerUnit
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCreateDate

public Date getCreateDate()
                   throws BusinessObjectException
Gets the date this resource was created.

Returns:
the value in the field CreateDate
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getLastUpdateDate

public Date getLastUpdateDate()
                       throws BusinessObjectException
Gets the date this resource was last updated.

Returns:
the value in the field LastUpdateDate
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getCreateUser

public String getCreateUser()
                     throws BusinessObjectException
Gets the name of the user that created this resource.

Returns:
the value in the field CreateUser
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getLastUpdateUser

public String getLastUpdateUser()
                         throws BusinessObjectException
Gets the name of the user that last updated this resource.

Returns:
the value in the field LastUpdateUser
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getProjectResourceSpreads

public ProjectResourceSpread[] getProjectResourceSpreads()
                                                  throws BusinessObjectException
Gets the field containing project spread data for this resource. If a resource is attempted to be loaded with project spread data, getProjectResourceSpread will return null if no project spread data was available for that resource. This field may not be included in the where clause or order by clause specified when loading business objects.

Returns:
the value in the field ProjectResourceSpread
Throws:
BusinessObjectException - if a problem occurred in the client-side business objects

getRequiredCreateFields

public static String[] getRequiredCreateFields()
Gets all fields that must be set before calling create() on this business object. Generally the array will contain one field in each position, but if this business object requires either one field or another field to be set, both of those fields will appear in an element of the returned array separated by '|'. For example, if this business object requires field A to always be set, and field B or field C to be set, one element in the returned array will contain A, and one element will contain B|C.

Returns:
String[] an array of required create fields

getFilterableFields

public static String[] getFilterableFields()
Gets all fields that can be filtered.

Returns:
String[] an array of filterable fields

getInternalDefaultLoadFields

public static String[] getInternalDefaultLoadFields()
An internal method that should not be called directly by client code.

Returns:
String[] an internal array

getAllFields

public static String[] getAllFields()
Gets all non-code fields for this business object.

Returns:
String[] an array of all fields

getInternalAllFields

public static String[] getInternalAllFields()
An internal method that should not be called directly by client code.

Returns:
String[] an internal array

getInternalAllFieldsSet

public static Set<String> getInternalAllFieldsSet()
An internal method that should not be called directly by client code.

Returns:
String[] an internal array

getMainFields

public static String[] getMainFields()
Gets all fields in the main group for this business object.

Returns:
String[] an array of fields in this group

getResourceSpreadFields

public static String[] getResourceSpreadFields()
Gets all spread fields that can be specified in the spreadFields parameter of loadWithResourceSpread methods for this business object.

Returns:
String[] an array of all spread fields

getWritableFields

public static String[] getWritableFields()
Gets all writable fields for this business object.

Returns:
String[] an array of writable fields

getDefaultXMLExportFields

public static String[] getDefaultXMLExportFields()
Gets the fields that are exported by the XML exporter when no fields are specified.

Returns:
String[] an array of field names

getMinimumXMLExportFields

public static String[] getMinimumXMLExportFields()
Gets all fields that are always exported at a minimum by the new flat XML exporter

Returns:
String[] an array of exported fields

toString

public String toString()
Returns a string representation of the object. The output is in XML.

Overrides:
toString in class Object
Returns:
String a string representation of the object.

create

public ObjectId create()
                throws ServerException,
                       NetworkException,
                       BusinessObjectException
Creates this Resource object in the database.

Returns:
ObjectId the unique ID of the newly created Resource object
Throws:
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 objects

create

public static ObjectId[] create(Session session,
                                Resource[] resources)
                         throws ServerException,
                                NetworkException,
                                BusinessObjectException
Creates multiple Resource objects in the database.

Parameters:
session - the Session object
resources - array of Resource objects to create
Returns:
ObjectId[] the array of unique IDs of newly created Resource objects
Throws:
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 objects

load

public static Resource load(Session session,
                            String[] fields,
                            ObjectId objId)
                     throws ServerException,
                            NetworkException,
                            BusinessObjectException
Loads a single Resource object from the database.

Parameters:
session - the Session object
fields - fields to load
objId - unique ID of the Resource object
Returns:
Resource the Resource object
Throws:
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 objects

load

public static BOIterator<Resource> load(Session session,
                                        String[] fields,
                                        ObjectId[] objIds)
                                 throws ServerException,
                                        NetworkException,
                                        BusinessObjectException
Loads multiple Resource objects from the database.

Parameters:
session - the Session object
fields - fields to load
objIds - object ids of the Resource objects
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

loadWithProjectResourceSpread

public static Resource loadWithProjectResourceSpread(Session session,
                                                     String[] nonSpreadFields,
                                                     ObjectId objId,
                                                     String[] spreadFields,
                                                     SpreadPeriodType periodType,
                                                     Date startDate,
                                                     Date endDate,
                                                     boolean bIncludeCumulative,
                                                     ObjectId[] projectObjectIds)
                                              throws ServerException,
                                                     NetworkException,
                                                     BusinessObjectException
Loads a Resource object with summarized spreads from the database.

Parameters:
nonSpreadFields - fields to load
objId - unique ID of the Resource object
spreadFields - the fields to include in the spread object
periodType - the period of the spread data (hour, day, etc.)
startDate - the start date of the spread
endDate - the end date of the spread
bIncludeCumulative - indicates whether to include cumulative spread data
projectObjectIds - object ids of the Project objects
Returns:
Resource the Resource object
Throws:
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 objects

loadWithProjectResourceSpread

public static BOIterator<Resource> loadWithProjectResourceSpread(Session session,
                                                                 String[] nonSpreadFields,
                                                                 ObjectId[] objIds,
                                                                 String[] spreadFields,
                                                                 SpreadPeriodType periodType,
                                                                 Date startDate,
                                                                 Date endDate,
                                                                 boolean bIncludeCumulative,
                                                                 ObjectId[] projectObjectIds)
                                                          throws ServerException,
                                                                 NetworkException,
                                                                 BusinessObjectException
Loads multiple Resource objects with summarized spreads from the database.

Parameters:
nonSpreadFields - fields to load
objIds - object ids of the Resource objects
spreadFields - the fields to include in the spread object
periodType - the period of the spread data (hour, day, etc.)
startDate - the start date of the spread
endDate - the end date of the spread
bIncludeCumulative - indicates whether to include cumulative spread data
projectObjectIds - object ids of the Project objects
Returns:
BOIterator a business object iterator used to get the results of the load request
Throws:
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 objects

update

public void update()
            throws ServerException,
                   NetworkException,
                   BusinessObjectException
Updates this Resource object in the database.

Overrides:
update in class com.primavera.integration.client.BOBase
Throws:
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 objects

update

public static void update(Session session,
                          Resource[] resources)
                   throws ServerException,
                          NetworkException,
                          BusinessObjectException
Updates multiple Resource objects in the database.

Parameters:
session - the Session object
resources - array of Resource objects to update
Throws:
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 objects

delete

public void delete()
            throws ServerException,
                   NetworkException,
                   BusinessObjectException
Deletes this Resource object from the database.

Overrides:
delete in class com.primavera.integration.client.BOBase
Throws:
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 objects

delete

public void delete(ObjectId replacementId)
            throws ServerException,
                   NetworkException,
                   BusinessObjectException
Deletes this Resource object from the database.

Overrides:
delete in class com.primavera.integration.client.BOBase
Parameters:
replacementId - unique ID of the new parent for all current child objects
Throws:
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 objects

delete

public static void delete(Session session,
                          Resource[] resources)
                   throws ServerException,
                          NetworkException,
                          BusinessObjectException
Deletes multiple Resource objects from the database.

Parameters:
session - the Session object
resources - array of Resource objects to delete
Throws:
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 objects

delete

public static void delete(Session session,
                          Resource[] resources,
                          ObjectId replacementParent)
                   throws ServerException,
                          NetworkException,
                          BusinessObjectException
Deletes multiple resource objects in a hierarchy from the database and set the new parent of all child objects.

Parameters:
session - the Session object
resources - array of Resource objects to delete
replacementParent - replacement parent object
Throws:
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 objects

Primavera Integration API 8.0

Copyright © 2003, 2010, Oracle and/or its affiliates. All rights reserved.