LoadProfileOptions#
Options for Project#loadProfile. They hold the ProfileQuery that selects the range, resources, basis and task lists of the LoadProfile, and the baseline the call expects. Create one with new LoadProfileOptions(query), then chain the fluent withX setters.
Declaration#
Constructors#
LoadProfileOptions(ProfileQuery)#
public
Creates options for the given query, with baselineId set to null.
Parameters
| Name | Type | Description |
|---|---|---|
query |
ProfileQuery |
What the profile covers. Required |
Fields#
| Field | Type | Default | Description |
|---|---|---|---|
query |
ProfileQuery |
set by the constructor | Range, resources, basis and task lists of the profile. |
baselineId |
String |
null |
The baseline the call expects. null skips the check. |
query#
public ProfileQuery query ;
The ProfileQuery that describes the profile: from and to, an optional resource list, an optional basis, and which task ids each bucket lists. It sets the shape of the returned LoadProfile. The field must not be null when the options are passed to Project#loadProfile.
baselineId#
public String baselineId ;
A baseline token taken from the latest ScheduleResult.baselineId. When it isn't null and doesn't name the project's current baseline, Project#loadProfile throws a ProjectException with code STALE_BASELINE. This keeps a profile from being read over a baseline that changed after the caller last solved.
Methods#
withQuery, withBaselineId#
public LoadProfileOptions
public LoadProfileOptions
Each setter assigns its field and returns this instance for chaining.
Returns - this LoadProfileOptions.
deepClone#
public LoadProfileOptions
Returns a copy with its own ProfileQuery.
Returns - a new LoadProfileOptions with the same values.
Errors - throws NullPointerException when query is null.
copy#
public LoadProfileOptions
Returns a shallow copy. The copy shares the query object with this instance.
Returns - a new LoadProfileOptions with the same field values.
equals, hashCode, toString#
public boolean
public int
public String
Inherited from ValueRecord. Two LoadProfileOptions are equal when their public fields are equal. toString() lists the fields in the form LoadProfileOptions{query=…, baselineId=…}.
Example#
;
;
Related#
Project#loadProfile- the call that takes these optionsProfileQuery- what the profile coversLoadProfile- whatloadProfilereturns- Resource load - pinning the profile to a baseline