Class Resource
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
ConstructorsConstructorDescriptionClass constructor specifying the Session.Class constructor specifying the Session and ObjectId of the object.Class constructor called internally after objects are retrieved from the server. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates this Resource object in the database.static ObjectId[]Creates multiple Resource objects in the database.createResourceAssignment(ResourceAssignment resourceassignment) Creates an associated ResourceAssignment object in the database.ObjectId[]createResourceAssignments(ResourceAssignment[] resourceassignments) Creates multiple associated ResourceAssignment objects in the database.createResourceChild(Resource resourcechild) Creates an associated Resource object in the database.ObjectId[]createResourceChildren(Resource[] resourcechildren) Creates multiple associated Resource objects in the database.createResourceRate(ResourceRate resourcerate) Creates an associated ResourceRate object in the database.ObjectId[]createResourceRates(ResourceRate[] resourcerates) Creates multiple associated ResourceRate objects in the database.voiddelete()Deletes this Resource object from the database.voidDeletes this Resource object from the database.static voidDeletes multiple Resource objects from the database.static voidDeletes multiple resource objects in a hierarchy from the database and set the new parent of all child objects.static String[]Gets all non-code fields for this business object.booleanGets 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.booleanGets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.Gets the name of the calendar.Gets the unique ID of the calendar assigned to the resource.Gets the date this resource was created.Gets the name of the user that created this resource.Gets the unique currency abbreviation for the currency associated with this resource.Gets the name of the currency associated with this resource.Gets the unique ID of the currency associated with this resource.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[]Deprecated.Gets the earliest day when the resource becomes overallocated, calculated during the summarization.Gets the e-mail address for the resource.Gets the resource identifier within the organization, typically the employee number or social security number.static String[]Gets all fields that can be filtered.getGUID()Gets the globally unique ID generated by the system.getId()Gets the short code that uniquely identifies the resource.Gets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system.static String[]An internal method that should not be called directly by client code.An internal method that should not be called directly by client code.static String[]An internal method that should not be called directly by client code.booleanGets the flag that indicates whether the resource is currently active.booleanGets the flag that indicates whether the resource is allowed to log overtime hours.Gets the date this resource was last updated.Gets the name of the user that last updated this resource.doubleGets the latitude of the location.Gets the name of the location assigned to the resource.Gets the unique ID of the location assigned to the resource.doubleGets the longitude of the location.static String[]Gets all fields in the main group for this business object.Gets the maximum work units per time this resource can perform on all their assigned activities.static String[]Gets all fields that are always exported at a minimum by the new flat XML exportergetName()Gets the name of the resource.Gets the unique ID generated by the system.Gets the office phone number for the resource.Gets the other phone numbers for the resource - pager, home phone, cell phone, etc.doubleGets the overtime factor used to compute the overtime price for the resource.Gets the unique ID of the parent resource of this resource in the hierarchy.Gets the planned price per unit for the project expense.Gets the short code that uniquely identifies the primary role for this resource.Gets the name of the primary role for this resource.Gets the unique ID of the role that is assigned as the resource's primary role.Gets the field containing project spread data for this resource.static String[]Gets all fields that must be set before calling create() on this business object.Gets the notes about the resource.static String[]Gets all spread fields that can be specified in the spreadFields parameter of loadWithResourceSpread methods for this business object.Gets the resource type: "Labor", "Nonlabor", or "Material".intGets the sequence number for sorting.Gets the unique ID of the shift associated with the resource.Gets the resource manager assigned to approve timesheets for the resource.Gets the unique ID of the resource manager assigned to approve timesheets for the resource.getTitle()Gets the title of the resource.Gets the abbreviation of the unit of measure.Gets the name of the unit of measure.Gets the unit of measure this material resource uses.Gets the user's login name.Gets the unique ID of the associated user.booleanGets the flag that indicates whether the resource uses timesheets.static String[]Gets all writable fields for this business object.static ResourceLoads a single Resource object from the database.static BOIterator<Resource>Loads multiple Resource objects from the database.loadActivities(String[] fields, String sWhereClause, String sOrderBy) Load the Activity objects to which this Resource is assigned as a ResourceAssignment.loadCalendar(String[] fields) Loads an associated Calendar object from the database.loadCurrency(String[] fields) Loads an associated Currency object from the database.loadDocuments(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated Document objects from the database.loadLocation(String[] fields) Loads an associated Location object from the database.loadParentResource(String[] fields) Loads an associated Resource object from the database.loadPrimaryRole(String[] fields) Loads an associated Role object from the database.loadProjectIssues(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ProjectIssue objects from the database.loadProjectResources(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ProjectResource objects from the database.loadResourceAccess(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceAccess objects from the database.loadResourceAssignments(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceAssignment objects from the database.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.loadResourceChildren(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated Resource objects from the database.loadResourceCodeAssignments(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceCodeAssignment objects from the database.loadResourceHours(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceHour objects from the database.loadResourceRates(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceRate objects from the database.loadResourceRoles(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated ResourceRole objects from the database.Loads multiple associated Risk objects from the database.static BOIterator<Resource>loadRootResources(Session session, String[] fields) Loads the root Resource objects from the database.Loads an associated Shift object from the database.loadTimesheetApprovalManager(String[] fields) Loads an associated User object from the database.loadTimesheets(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated Timesheet objects from the database.loadUDFValues(String[] fields, String sWhereClause, String sOrderBy) Loads multiple associated UDFValue objects from the database.loadUnitOfMeasure(String[] fields) Loads an associated UnitOfMeasure object from the database.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 ResourceloadWithProjectResourceSpread(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.voidsetAutoComputeActuals(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.voidsetCalculateCostFromUnits(boolean b) Sets the option to indicate that any new assignments for this resource will have its costs recalculated whenever any quantity changes occur.voidSets the unique ID of the calendar assigned to the resource.voidSets the unique ID of the currency associated with this resource.voidSets the default units/time setting, which determines the value of the remaining units/time and planned units/time when a resource assignment is added.voidSets the e-mail address for the resource.voidSets the resource identifier within the organization, typically the employee number or social security number.voidSets the globally unique ID generated by the system.voidSets the short code that uniquely identifies the resource.voidSets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system.voidsetIsActive(boolean b) Sets the flag that indicates whether the resource is currently active.voidsetIsOverTimeAllowed(boolean b) Sets the flag that indicates whether the resource is allowed to log overtime hours.voidSets the unique ID of the location assigned to the resource.voidSets the maximum work units per time this resource can perform on all their assigned activities.voidSets the name of the resource.voidSets the unique ID generated by the system.voidSets the office phone number for the resource.voidSets the other phone numbers for the resource - pager, home phone, cell phone, etc.voidsetOvertimeFactor(double d) Sets the overtime factor used to compute the overtime price for the resource.voidSets the unique ID of the parent resource of this resource in the hierarchy.voidSets the unique ID of the role that is assigned as the resource's primary role.voidSets the notes about the resource.voidSets the resource type: "Labor", "Nonlabor", or "Material".voidsetSequenceNumber(int i) Sets the sequence number for sorting.voidSets the unique ID of the shift associated with the resource.voidSets the unique ID of the resource manager assigned to approve timesheets for the resource.voidSets the title of the resource.voidSets the unit of measure this material resource uses.voidSets the unique ID of the associated user.voidsetUseTimesheets(boolean b) Sets the flag that indicates whether the resource uses timesheets.toString()Returns a string representation of the object.voidupdate()Updates this Resource object in the database.static voidUpdates multiple Resource objects in the database.Methods inherited from class com.primavera.integration.client.bo.BusinessObject
equals, getMaxFieldLength, getValue, getValue, hashCode, isNull, setEarlyDate, setNullMethods inherited from class com.primavera.integration.client.BOBase
combineFields
-
Constructor Details
-
Resource
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
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 SessionobjId- 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 SessionrowSet- the PrmRowSet retrieved from the serveriIndex- the row index in the PrmRowSet associated with this business object- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
-
Method Details
-
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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- order-by clausespreadFields- the fields to include in the spread objectperiodType- the period of the spread data (hour, day, etc.)startDate- the start date of the spreadendDate- the end date of the spreadbIncludeCumulative- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectfields- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadsWhereClause- where clausesOrderBy- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- if a problem occurred in the client-side business objects
-
loadLocation
public Location loadLocation(String[] fields) throws ServerException, NetworkException, BusinessObjectException Loads an associated Location object from the database.- Parameters:
fields- fields to load- Returns:
- Location the Location object
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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.- Parameters:
fields- fields to loadsWhereClause- where clausesOrderBy- order by clause- Returns:
- iterator of Activity objects
- Throws:
ServerExceptionNetworkExceptionBusinessObjectException
-
getObjectId
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:
getObjectIdin classBusinessObject- Returns:
- the value in the field ObjectId
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
setObjectId
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:
setObjectIdin classBusinessObject- Parameters:
o- the value to set this field to- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getParentObjectId
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-
getLocationObjectId
Gets the unique ID of the location assigned to 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 LocationObjectId
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
setLocationObjectId
Sets the unique ID of the location assigned to 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
-
getLocationName
Gets the name of the location assigned to the resource.- Returns:
- the value in the field LocationName
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getLongitude
Gets the longitude of the location.- Returns:
- the value in the field Longitude
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getLatitude
Gets the latitude of the location.- Returns:
- the value in the field Latitude
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getUnitOfMeasureObjectId
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
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
-
getUnitOfMeasureAbbreviation
Gets the abbreviation of the unit of measure.- Returns:
- the value in the field UnitOfMeasureAbbreviation
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getUnitOfMeasureName
Gets the name of the unit of measure.- Returns:
- the value in the field UnitOfMeasureName
- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getId
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Gets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system. '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
Sets the flag indicating whether the resource is integrated with an Enterprise Resource Planning (ERP) system. '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
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
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
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
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
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
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
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
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
-
setMaxUnitsPerTime
Sets 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.- Parameters:
d- the value to set this field to- Throws:
BusinessObjectException- if a problem occurred in the client-side business objects
-
getEffectiveDate
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
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
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
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
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
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
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
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
Gets all fields that can be filtered.- Returns:
- String[] an array of filterable fields
-
getInternalDefaultLoadFields
An internal method that should not be called directly by client code.- Returns:
- String[] an internal array
-
getAllFields
Gets all non-code fields for this business object.- Returns:
- String[] an array of all fields
-
getInternalAllFields
An internal method that should not be called directly by client code.- Returns:
- String[] an internal array
-
getInternalAllFieldsSet
An internal method that should not be called directly by client code.- Returns:
- String[] an internal array
-
getMainFields
Gets all fields in the main group for this business object.- Returns:
- String[] an array of fields in this group
-
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
Gets all writable fields for this business object.- Returns:
- String[] an array of writable fields
-
getDefaultXMLExportFields
Deprecated.Gets the fields that are exported by the hierarchical XML exporter when no fields are specified. This method is no longer relevant since the hierarchical XML exporter has been replaced by the flat XML exporter.- Returns:
- String[] an array of field names
-
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
Returns a string representation of the object. The output is in XML. -
create
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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectresources- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectfields- fields to loadobjId- unique ID of the Resource object- Returns:
- Resource the Resource object
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectfields- fields to loadobjIds- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadobjId- unique ID of the Resource objectspreadFields- the fields to include in the spread objectperiodType- the period of the spread data (hour, day, etc.)startDate- the start date of the spreadendDate- the end date of the spreadbIncludeCumulative- indicates whether to include cumulative spread dataprojectObjectIds- object ids of the Project objects- Returns:
- Resource the Resource object
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 loadobjIds- object ids of the Resource objectsspreadFields- the fields to include in the spread objectperiodType- the period of the spread data (hour, day, etc.)startDate- the start date of the spreadendDate- the end date of the spreadbIncludeCumulative- indicates whether to include cumulative spread dataprojectObjectIds- 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-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- if a problem occurred in the client-side business objects
-
update
Updates this Resource object in the database.- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectresources- array of Resource objects to update- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- if a problem occurred in the client-side business objects
-
delete
Deletes this Resource object from the database.- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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.- Parameters:
replacementId- unique ID of the new parent for all current child objects- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectresources- array of Resource objects to delete- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- 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 objectresources- array of Resource objects to deletereplacementParent- replacement parent object- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layerBusinessObjectException- if a problem occurred in the client-side business objects
-