Professional Services Automation Apex API Developer Reference

pse.RateCardMatcherItem

global abstract with sharing class RateCardMatcherItem implements RateCardMatcher.MatcherItem

A pse.RateCardMatcherItem is used by the pse.RateCardMatchingService to match rate cards to records.

Methods

RateCardMatcherItem

global RateCardMatcherItem()

Constructor for pse.RateCardMatcherItem.

getRecord

global SObject getRecord()

Get the record that the pse.RateCardMatcherItem represents.

Return Value

Returns the sobject that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Resource_Request__c aResourceRequest = [SELECT Id, Name FROM pse__Resource_Request__c LIMIT 1];

//set the record
RateCardMatcherItem matcherItem = new RateCardMatcherItem();
matcherItem.setRecord(aResourceRequest);

//get the record
pse__Resource_Request__c result = (pse__Resource_Request__c)matcherItem.getRecord();
System.assertEquals(aResourceRequest, result);

getRecordId

global Id getRecordId()

Get the Id of the record that the pse.RateCardMatcherItem represents.

Return Value

Returns the Id of the record that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Resource_Request__c aResourceRequest = [SELECT Id, Name FROM pse__Resource_Request__c LIMIT 1];

//set the record
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRecord(aResourceRequest);

//get the record Id
Id result = matcherItem.getRecordID();
System.assertEquals(aResourceRequest.Id, result);

setRecord

global void setRecord(SObject record)

Sets the record that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
record SObject The record to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Resource_Request__c aResourceRequest = [SELECT Id, Name FROM pse__Resource_Request__c LIMIT 1];

//set the record
RateCardMatcherItem matcherItem = new RateCardMatcherItem();
matcherItem.setRecord(aResourceRequest);

//get the record
pse__Resource_Request__c result = (pse__Resource_Request__c)matcherItem.getRecord();
System.assertEquals(aResourceRequest, result);

getAccountId

global Id getAccountId()

Get the Id of the Account that the pse.RateCardMatcherItem represents.

Return Value

Returns the Id of the Account that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Account anAccount = [SELECT Id, Name FROM Account LIMIT 1];

//set Account
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setAccountID(anAccount.Id);

//get the Account Id
Id result = matcherItem.getAccountId();
System.assertEquals(anAccount.Id, result);

setAccountId

global void setAccountId(Id accountId)

Sets the Account Id that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
accountId Id The accountId to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Account anAccount = [SELECT Id, Name FROM Account LIMIT 1];

//set Account
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setAccountID(anAccount.Id);

//get the Account Id
Id result = matcherItem.getAccountId();
System.assertEquals(anAccount.Id, result);

getRegionId

global Id getRegionId()

Get the Id of the Region that the pse.RateCardMatcherItem represents.

Return Value

Returns the Id of the Region the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Region__c aRegion = [SELECT Id, Name FROM pse__Region__c LIMIT 1];

//set the region Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRegionId(aRegion.Id);

//get the region Id
Id result = matcherItem.getRegionId();
System.assertEquals(aRegion.Id, result);

setRegionId

global void setRegionId(Id regionId)

Sets the Region Id that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
regionId Id The regionId to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Region__c aRegion = [SELECT Id, Name FROM pse__Region__c LIMIT 1];

//set the region Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRegionId(aRegion.Id);

//get the region Id
Id result = matcherItem.getRegionId();
System.assertEquals(aRegion.Id, result);

getRegionIdChain

global String getRegionIdChain()

Get the regionIdChain that the pse.RateCardMatcherItem represents.

Return Value

Returns the regionIdChain that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Region__c aRegion = [SELECT Id, Name, pse__Region_ID_Chain__c FROM pse__Region__c LIMIT 1];

//set the region Id chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRegionIdChain(aRegion.pse__Region_ID_Chain__c);

//get the region Id chain
String result = matcherItem.getRegionIdChain();
System.assertEquals(aRegion.pse__Region_ID_Chain__c, result);

setRegionIdChain

global void setRegionIdChain(String regionIdChain)

Sets the regionIdChain that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
regionIdChain String The regionIdChain to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Region__c aRegion = [SELECT Id, Name, pse__Region_ID_Chain__c FROM pse__Region__c LIMIT 1];

//set the region Id chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRegionIdChain(aRegion.pse__Region_ID_Chain__c);

//get the region Id chain
String result = matcherItem.getRegionIdChain();
System.assertEquals(aRegion.pse__Region_ID_Chain__c, result);

getPracticeId

global Id getPracticeId()

Get the PracticeId that the pse.RateCardMatcherItem represents.

Return Value

Returns the PracticeId that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Practice__c aPractice = [SELECT Id, Name FROM pse__Practice__c LIMIT 1];

//set the Practice Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setPracticeId(aPractice.Id);

//get the Practice Id
Id result = matcherItem.getPracticeId();
System.assertEquals(aPractice.Id, result);

setPracticeId

global void setPracticeId(Id practiceId)

Sets the PracticeId that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
practiceId Id The practiceId to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Practice__c aPractice = [SELECT Id, Name FROM pse__Practice__c LIMIT 1];

//set the Practice Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setPracticeId(aPractice.Id);

//get the Practice Id
Id result = matcherItem.getPracticeId();
System.assertEquals(aPractice.Id, result);

getPracticeIdChain

global String getPracticeIdChain()

Get the practiceIdChain that the pse.RateCardMatcherItem represents.

Return Value

Returns the practiceIdChain that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Practice__c aPractice = [SELECT Id, Name, pse__Practice_ID_Chain__c FROM pse__Practice__c LIMIT 1];

//set the Practice Id Chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setPracticeIdChain(aPractice.pse__Practice_ID_Chain__c);

//get the Practice Id Chain
String result = matcherItem.getPracticeIdChain();
System.assertEquals(aPractice.pse__Practice_ID_Chain__c, result);

setPracticeIdChain

global void setPracticeIdChain(String practiceIdChain)

Sets the practiceIdChain that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
practiceIdChain String The practiceIdChain to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Practice__c aPractice = [SELECT Id, Name, pse__Practice_ID_Chain__c FROM pse__Practice__c LIMIT 1];

//set the Practice Id Chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setPracticeIdChain(aPractice.pse__Practice_ID_Chain__c);

//get the Practice Id Chain
String result = matcherItem.getPracticeIdChain();
System.assertEquals(aPractice.pse__Practice_ID_Chain__c, result);

getGroupId

global Id getGroupId()

Get the groupId that the pse.RateCardMatcherItem represents.

Return Value

Returns the groupId that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Grp__c aGroup = [SELECT Id, Name FROM pse__Grp__c LIMIT 1];

//set the Group Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setGroupId(aGroup.Id);

//get the Group Id
Id result = matcherItem.getGroupId();
System.assertEquals(aGroup.Id, result);

setGroupId

global void setGroupId(Id groupId)

Sets the groupId that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
groupId Id The groupId to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Grp__c aGroup = [SELECT Id, Name FROM pse__Grp__c LIMIT 1];

//set the Group Id
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setGroupId(aGroup.Id);

//get the Group Id
Id result = matcherItem.getGroupId();
System.assertEquals(aGroup.Id, result);

getGroupIdChain

global String getGroupIdChain()

Get the groupIdChain that the pse.RateCardMatcherItem represents.

Return Value

Returns the groupIdChain that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Grp__c aGroup = [SELECT Id, Name, pse__Group_ID_Chain__c FROM pse__Grp__c LIMIT 1];

//set the Group Id Chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setGroupIdChain(aGroup.pse__Group_ID_Chain__c);

//get the Group Id Chain
String result = matcherItem.getGroupIdChain();
System.assertEquals(aGroup.pse__Group_ID_Chain__c, result);

setGroupIdChain

global void setGroupIdChain(String groupIdChain)

Sets the groupIdChain that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
groupIdChain String The groupIdChain to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Grp__c aGroup = [SELECT Id, Name, pse__Group_ID_Chain__c FROM pse__Grp__c LIMIT 1];

//set the Group Id Chain
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setGroupIdChain(aGroup.pse__Group_ID_Chain__c);

//get the Group Id Chain
String result = matcherItem.getGroupIdChain();
System.assertEquals(aGroup.pse__Group_ID_Chain__c, result);

getRole

global String getRole()

Get the role that the pse.RateCardMatcherItem represents.

Return Value

Returns the role that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Assignment__c assignment = [SELECT Id, Name, pse__Role__c FROM pse__Assignment__c LIMIT 1];

//set the role
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRole(assignment.pse__Role__c);

//get the role
String result = matcherItem.getRole();
System.assertEquals(assignment.pse__Role__c, result);

setRole

global void setRole(String role)

Sets the role that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
role String The role to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Assignment__c assignment = [SELECT Id, Name, pse__Role__c FROM pse__Assignment__c LIMIT 1];

//set the role
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRole(assignment.pse__Role__c);

//get the role
String result = matcherItem.getRole();
System.assertEquals(assignment.pse__Role__c, result);

getCurrencyIsoCode

global String getCurrencyIsoCode()

Get the currencyIsoCode that the pse.RateCardMatcherItem represents.

Return Value

Returns the currencyIsoCode that the RateCardMatcherItem represents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

setCurrencyIsoCode

global void setCurrencyIsoCode(String currencyIsoCode)

Sets the currencyIsoCode that the pse.RateCardMatcherItem represents.

Input Parameters

Name Type Description
currencyIsoCode String The currencyIsoCode to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

getStartDate

global Date getStartDate()

Get the startDate of the pse.RateCardMatcherItem.

Return Value

Returns the startDate of the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Date startDate = Date.today(); 

//set the start date
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setStartDate(startDate);

//get the start date
Date result = matcherItem.getStartDate();
System.assertEquals(startDate, result);

setStartDate

global void setStartDate(Date startDate)

Set the startDate for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
startDate Date The startDate to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Date startDate = Date.today(); 

//set the start date
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setStartDate(startDate);

//get the start date
Date result = matcherItem.getStartDate();
System.assertEquals(startDate, result);

getProjectOpportunityDiscountRate

global Decimal getProjectOpportunityDiscountRate()

Get the projectOpportunityDiscountRate of the pse.RateCardMatcherItem.

Return Value

Returns the projectOpportunityDiscountRate of the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Decimal discount = 50.0; 

//set the discount
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setProjectOpportunityDiscountRate(discount);

//get the discount
Decimal result = matcherItem.getProjectOpportunityDiscountRate();
System.assertEquals(discount, result);

setProjectOpportunityDiscountRate

global void setProjectOpportunityDiscountRate(Decimal projectOpportunityDiscountRate)

Set the projectOpportunityDiscountRate for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
projectOpportunityDiscountRate Decimal The projectOpportunityDiscountRate to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Decimal discount = 50.0; 

//set the discount
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setProjectOpportunityDiscountRate(discount);

//get the discount
Decimal result = matcherItem.getProjectOpportunityDiscountRate();
System.assertEquals(discount, result);

getProjectOpportunityDiscountLimitAmount

global Decimal getProjectOpportunityDiscountLimitAmount()

Get the projectOpportunityDiscountLimitAmount of the pse.RateCardMatcherItem.

Return Value

Returns the projectOpportunityDiscountLimitAmount of the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Decimal discountLimit = 50.0; 

//set the discount limit
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setProjectOpportunityDiscountLimitAmount(discount);

//get the discount limit
Decimal result = matcherItem.getProjectOpportunityDiscountLimitAmount();
System.assertEquals(discountLimit, result);

setProjectOpportunityDiscountLimitAmount

global void setProjectOpportunityDiscountLimitAmount(Decimal projectOpportunityDiscountLimitAmount)

Set the projectOpportunityDiscountLimitAmount for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
projectOpportunityDiscountLimitAmount Decimal The projectOpportunityDiscountLimitAmount to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Decimal discountLimit = 50.0; 

//set the discount limit
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setProjectOpportunityDiscountLimitAmount(discount);

//get the discount limit
Decimal result = matcherItem.getProjectOpportunityDiscountLimitAmount();
System.assertEquals(discountLimit, result);

getRateCardSetId

global Id getRateCardSetId()

Get the rateCardSetId of the pse.RateCardMatcherItem.

Return Value

Returns the rateCardSetId of the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Rate_Card_Set__c rateCardSet = [SELECT Id, Name FROM pse__Rate_Card_Set__c LIMIT 1]; 

//set the ratecard Id set
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRateCardSetId(rateCardSet.Id);

//get the ratecard Id set
Id result = matcherItem.getRateCardSetId();
System.assertEquals(rateCardSet.Id, result);

setRateCardSetId

global void setRateCardSetId(Id rateCardSetId)

Set the rateCardSetId for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
rateCardSetId Id The rateCardSetId to set on the RateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Rate_Card_Set__c rateCardSet = [SELECT Id, Name FROM pse__Rate_Card_Set__c LIMIT 1]; 

//set the ratecard Id set
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setRateCardSetId(rateCardSet.Id);

//get the ratecard Id set
Id result = matcherItem.getRateCardSetId();
System.assertEquals(rateCardSet.Id, result);

getUseDatedResourceBillRates

global Boolean getUseDatedResourceBillRates()

Get the value of the boolean that indicates whether or not dated resource bill rate cards should be used for the pse.RateCardMatcherItem.

Return Value

Returns true if dated resource bill rate cards should be used.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//set to use dated resource rate bill ratecards
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setUseDatedResourceBillRates(true);

//get if the matcher should use dated resource rate bill ratecards
Boolean result = matcherItem.getUseDatedResourceBillRates();
System.assertEquals(true, result);

setUseDatedResourceBillRates

global void setUseDatedResourceBillRates(Boolean useDatedResourceBillRates)

Set the value of the boolean that indicates whether or not dated resource bill rate cards should be used for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
useDatedResourceBillRates Boolean The true or false value for useDatedResourceBillRates to set on the RateCardMatcherItem. Pass in true if dated resource bill rate cards should be used.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//set to use dated resource rate bill ratecards
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setUseDatedResourceBillRates(true);

//get if the matcher should use dated resource rate bill ratecards
Boolean result = matcherItem.getUseDatedResourceBillRates();
System.assertEquals(true, result);

getUseDatedResourceCostRates

global Boolean getUseDatedResourceCostRates()

Get the value of the boolean that indicates whether or not dated resource cost rate cards should be used for the pse.RateCardMatcherItem.

Return Value

Returns true if dated resource cost rate cards should be used.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//set to use dated resource rate cost ratecards
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setUseDatedResourceCostRates(true);

//get if the matcher should use dated resource rate cost ratecards
Boolean result = matcherItem.getUseDatedResourceCostRates();
System.assertEquals(true, result);

setUseDatedResourceCostRates

global void setUseDatedResourceCostRates(Boolean useDatedResourceCostRates)

Set the value of the boolean that indicates whether or not dated resource cost rate cards should be used for the pse.RateCardMatcherItem.

Input Parameters

Name Type Description
useDatedResourceCostRates Boolean The true or false value for useDatedResourceCostRates to set on the RateCardMatcherItem. Pass in true if dated resource cost rate cards should be used.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//set to use dated resource rate cost ratecards
pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.setUseDatedResourceCostRates(true);

//get if the matcher should use dated resource rate cost ratecards
Boolean result = matcherItem.getUseDatedResourceCostRates();
System.assertEquals(true, result);

onMatch

global abstract void onMatch(pse__Rate_Card__c rateCard, pse.RateCardMatchingService.DatedResourceRateType rateCardType)

Behavior to perform once a matched rate card has been found.

Input Parameters

Name Type Description
rateCard pse__Rate_Card__c The rate card that has been found for the rateCardMatcherItem.
rateCardType pse.RateCardMatchingService.DatedResourceRateType The rateCardType of the rate card that has been found for the rateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse__Rate_Card__c rateCard = [SELECT Id, Name, pse__Dated_Resource_Rate_Type__c FROM pse__Rate_Card__c LIMIT 1];

pse.RateCardMatchingService.RateCardType ratetype = pse.RateCardMatchingService.getDatedResourceRateType(rateCard);

pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.onMatch(rateCard, ratetype);

Boolean result = matcherItem.isDirty();
System.assertEquals(true, result);

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

public with sharing class MatcherItemExample extends pse.RateCardMatcherItem {
    private Boolean isDirty = false;
    
    public override void onMatch(
            pse__Rate_Card__c rateCard,
            pse.RateCardMatchingService.RateCardType rateCardType
        ) {
            if(rateCard == null)
            {
                onNoMatch(rateCardType);
            }

            if(rateCard.Name == 'MatchedName')
            {
                isDirty = true
                pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
                assignment.pse__Rate_Card__c = rateCard.Id
            }

        }

    public override void onNoMatch(pse.RateCardMatchingService.RateCardType rateCardType)
    {
        pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
        
        if(rateCardType == pse.RateCardMatchingService.RateCardType.FIXED_RATE){
            assignment.pse__Rate_Card__c = null;
        }
    }

    public override Boolean isDirty()
    {
        return isDirty;
    }
}

onNoMatch

global abstract void onNoMatch(pse.RateCardMatchingService.DatedResourceRateType rateCardType)

Behavior to perform if a matched rate card is not found.

Input Parameters

Name Type Description
rateCardType pse.RateCardMatchingService.DatedResourceRateType The rateCardType of rate cards that were not found for the rateCardMatcherItem.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

pse.RateCardMatcherItem matcherItem = new pse.RateCardMatcherItem();
matcherItem.onNoMatch(RateCardMatchingService.RateCardType.DATED_RATE_BILL);

Boolean result = matcherItem.isDirty();
System.assertEquals(true, result);

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

public with sharing class MatcherItemExample extends pse.RateCardMatcherItem {
    private Boolean isDirty = false;
    
    public override void onMatch(
            pse__Rate_Card__c rateCard,
            pse.RateCardMatchingService.RateCardType rateCardType
        ) {
            if(rateCard == null)
            {
                onNoMatch(rateCardType);
            }

            if(rateCard.Name == 'MatchedName')
            {
                isDirty = true
                pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
                assignment.pse__Rate_Card__c = rateCard.Id
            }

        }

    public override void onNoMatch(pse.RateCardMatchingService.RateCardType rateCardType)
    {
        pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
        
        if(rateCardType == pse.RateCardMatchingService.RateCardType.FIXED_RATE){
            assignment.pse__Rate_Card__c = null;
        }
    }

    public override Boolean isDirty()
    {
        return isDirty;
    }
}

isDirty

global abstract Boolean isDirty()

Indicates if the rateCardMatcherItem has been modified.

Return Value

Returns true if the rateCardMatcherItem has been modified.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

public with sharing class MatcherItemExample extends pse.RateCardMatcherItem {
    private Boolean isDirty = false;
    
    public override void onMatch(
            pse__Rate_Card__c rateCard,
            pse.RateCardMatchingService.RateCardType rateCardType
        ) {
            if(rateCard == null)
            {
                onNoMatch(rateCardType);
            }

            if(rateCard.Name == 'MatchedName')
            {
                isDirty = true
                pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
                assignment.pse__Rate_Card__c = rateCard.Id
            }

        }

    public override void onNoMatch(pse.RateCardMatchingService.RateCardType rateCardType)
    {
        pse__Assignment__c assignment = (pse__Assignment__c) getRecord();
        
        if(rateCardType == pse.RateCardMatchingService.RateCardType.FIXED_RATE){
            assignment.pse__Rate_Card__c = null;
        }
    }

    public override Boolean isDirty()
    {
        return isDirty;
    }
}
© Copyright 2009–2025 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.