Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27d903678c | ||
|
|
94129a9791 | ||
|
|
368978bf20 | ||
|
|
9716a88489 | ||
|
|
b9f2bde59f | ||
|
|
ea31aa49fc | ||
|
|
3e89f74910 | ||
|
|
493bfc1eee | ||
|
|
e48df56aa8 | ||
|
|
44f31df4ad | ||
|
|
c892f821c7 | ||
|
|
132d7421a7 | ||
|
|
f02bce4979 | ||
|
|
7c9ee600ec | ||
|
|
a4e2d0ed84 | ||
|
|
8a6e7a37aa | ||
|
|
89d7ec5ac1 | ||
|
|
a1bcd4bef4 |
@@ -20,13 +20,19 @@ jobs:
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 24
|
||||
|
||||
- name: Install Salesforce CLI with NPM
|
||||
run: npm install @salesforce/cli --global
|
||||
|
||||
- name: Authorize with the dev hub
|
||||
run: echo "${{ secrets.SFDX_AUTH_URL }}" | sf org login sfdx-url --alias SFDX-ENV --set-default-dev-hub --sfdx-url-stdin
|
||||
env:
|
||||
SFDX_AUTH_URL: ${{ secrets.SFDX_AUTH_URL }}
|
||||
run: |
|
||||
echo "$SFDX_AUTH_URL" | wc -c
|
||||
echo "${{ secrets.SFDX_AUTH_URL }}" | wc -c
|
||||
echo "$Env:SFDX_AUTH_URL" | wc -c
|
||||
echo "${{ secrets.SFDX_AUTH_URL }}" | sf org login sfdx-url --alias SFDX-ENV --set-default-dev-hub --sfdx-url-stdin
|
||||
|
||||
- name: Setup the config parameters needed
|
||||
run: |
|
||||
@@ -34,8 +40,8 @@ jobs:
|
||||
|
||||
- name: Setup Git Configuration
|
||||
run: |
|
||||
git config --global user.name 'WimVelzeboer'
|
||||
git config --global user.email 'wim@velzeboer.nl'
|
||||
git config --local user.name github-actions
|
||||
git config --local user.email github-actions@github.com
|
||||
|
||||
- name: Fetch required dependency framework fflib-apex-mocks
|
||||
run: |
|
||||
@@ -56,8 +62,10 @@ jobs:
|
||||
id: get-branch-name
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo "Branch name: ${{ github.head_ref }}"
|
||||
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Branch name: ${GITHUB_REF#refs/heads/}"
|
||||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
@@ -78,13 +86,6 @@ jobs:
|
||||
echo "PACKAGE_ID=$VERSION_ID" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Appending to package version log
|
||||
run: |
|
||||
DT=$(date '+%d/%m/%Y %H:%M:%S');
|
||||
echo "|$PACKAGE_VERSION (BETA) | $PACKAGE_ID | Created on $DT |" >> README.md
|
||||
git add README.md
|
||||
git commit -am "Update Package Version Log with $PACKAGE_VERSION-Beta"
|
||||
|
||||
- name: Push changes to GIT
|
||||
run: |
|
||||
git push
|
||||
git push
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
name: Publish a new package version
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- closed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -13,15 +14,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout main branch
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{github.event.pull_request.head.ref}}
|
||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||
ref: main
|
||||
token: ${{ secrets.CI_PAT }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 24
|
||||
|
||||
- name: Install Salesforce CLI with NPM
|
||||
run: npm install @salesforce/cli --global
|
||||
@@ -33,33 +36,23 @@ jobs:
|
||||
run: |
|
||||
sf config set target-dev-hub SFDX-ENV --global
|
||||
|
||||
- name: Get branch name
|
||||
id: get-branch-name
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo "Branch name: ${{ github.head_ref }}"
|
||||
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Branch name: ${GITHUB_REF#refs/heads/}"
|
||||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Fetching Latest Package Version Id
|
||||
run: |
|
||||
DATA=`sf package version list --packages "fflibApexExtensions" --target-dev-hub SFDX-ENV --branch $BRANCH_NAME --json`
|
||||
LATEST_VERSION=`echo "$DATA" | jq '.result[-1]'`
|
||||
|
||||
VERSION=`echo "$LATEST_VERSION" | jq -r '.Version'`
|
||||
VERSION_NAME=`echo "$LATEST_VERSION" | jq -r '.Name'`
|
||||
VERSION_ID=`echo "$LATEST_VERSION" | jq -r '.SubscriberPackageVersionId'`
|
||||
|
||||
echo "Version: $VERSION"
|
||||
echo "Version Name: $VERSION_NAME"
|
||||
VERSION_ID=`cat sfdx-project.json | jq -r '.packageAliases | to_entries | [last] | .[0].value '`
|
||||
echo "Version ID: $VERSION_ID"
|
||||
|
||||
JSON=`sf package version list --packages "fflibApexExtensions" --target-dev-hub SFDX-ENV --json`
|
||||
DATA=`echo "$JSON" | jq -r --arg VERSION "$VERSION_ID" '.result | .[] | select(.SubscriberPackageVersionId == $VERSION)'`
|
||||
|
||||
VERSION_NUMBER=`echo "$DATA" | jq -r '.Version'`
|
||||
echo "Version: $VERSION_NUMBER"
|
||||
|
||||
VERSION_NAME=`echo "$DATA" | jq -r '.Name'`
|
||||
echo "Version Name: $VERSION_NAME"
|
||||
|
||||
echo "PACKAGE_VERSION_ID=$VERSION_ID" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION_NAME=$VERSION_ID" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION=$VERSION_NUMBER" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Promoting BETA Package Version
|
||||
run: |
|
||||
@@ -69,27 +62,35 @@ jobs:
|
||||
run: |
|
||||
echo "Increasing package versionName"
|
||||
NEW_PACKAGE_VERSION_NAME=`echo "ver $(echo "$PACKAGE_VERSION" | cut -d ' ' -f2 | cut -d '.' -f1).$(expr "$(echo "$PACKAGE_VERSION" | cut -d ' ' -f2 | cut -d '.' -f2)" + 1)"`
|
||||
echo "Current package version name: $PACKAGE_VERSION"
|
||||
echo "New package version name: $NEW_PACKAGE_VERSION_NAME"
|
||||
cat sfdx-project.json | jq -r --arg VERSION "$NEW_PACKAGE_VERSION_NAME" '.packageDirectories |= map(select(.package == "fflibApexExtensions").versionName = $VERSION)' > tmp.json
|
||||
mv tmp.json sfdx-project.json
|
||||
|
||||
echo "Increasing package versionNumber"
|
||||
NEW_PACKAGE_VERSION=`echo "$(echo "$NEW_PACKAGE_VERSION_NAME" | cut -d ' ' -f2).0.NEXT"`
|
||||
echo "Current package version: $PACKAGE_VERSION"
|
||||
echo "New package version: $NEW_PACKAGE_VERSION"
|
||||
cat sfdx-project.json | jq -r --arg VERSION "$NEW_PACKAGE_VERSION" '.packageDirectories |= map(select(.package == "fflibApexExtensions").versionNumber = $VERSION)' > tmp.json
|
||||
mv tmp.json sfdx-project.json
|
||||
|
||||
echo "NEW_PACKAGE_VERSION_NAME=$NEW_PACKAGE_VERSION_NAME" >> "$GITHUB_ENV"
|
||||
echo "NEW_PACKAGE_VERSION=$NEW_PACKAGE_VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Updating Package Version Log
|
||||
- name: Appending to package version log
|
||||
run: |
|
||||
sed -i "s/ (BETA) | $$PACKAGE_VERSION_ID/| $PACKAGE_VERSION_ID/g" README.md
|
||||
DT=$(date '+%d/%m/%Y %H:%M:%S');
|
||||
echo "| $PACKAGE_VERSION | $PACKAGE_VERSION_ID | Created on $DT |" >> README.md
|
||||
REPLACEMENT="sf package install --package $PACKAGE_VERSION_I0--wait=10 --target-org YOUR_ORG_ALIAS"
|
||||
sed -i 's|^sf package install.*|sf package install --package '$PACKAGE_VERSION_ID' --wait=10 --target-org $YOUR_ORG_ALIAS|' README.md
|
||||
sed -i 's|^Either clone the repository.*|Either clone the repository and import the package manually, use the [Package Installation URL](https://login.salesforce.com/packaging/installPackage.apexp?p0='$PACKAGE_VERSION_ID')|' README.md
|
||||
|
||||
- name: Committing and pushing changes
|
||||
run: |
|
||||
git config --global user.name 'WimVelzeboer'
|
||||
git config --global user.email 'wim@velzeboer.nl'
|
||||
git config --local user.name github-actions
|
||||
git config --local user.email github-actions@github.com
|
||||
git add sfdx-project.json
|
||||
git add README.md
|
||||
git commit -am "Update package version to $NEW_PACKAGE_VERSION"
|
||||
git tag -a "v$PACKAGE_VERSION" -m "Release Version $PACKAGE_VERSION\n\nPackage Version Id: $PACKAGE_VERSION_ID"
|
||||
git push --tags
|
||||
git tag -a "v$PACKAGE_VERSION" -m "Release Version $PACKAGE_VERSION" -m "" -m "Package Version Id: $PACKAGE_VERSION_ID"
|
||||
git push origin main --tags
|
||||
@@ -6,6 +6,17 @@ This extension package is dependent on the following packages:
|
||||
- [fflib-apex-mocks](https://github.com/apex-enterprise-patterns/fflib-apex-mocks)
|
||||
- [fflib-apex-common](https://github.com/apex-enterprise-patterns/fflib-apex-common)
|
||||
|
||||
## Installation
|
||||
|
||||
The package is available as an Unlocked Managed Package (2GP) with package ID `0HoJ8000000KyjfKAC`.
|
||||
|
||||
Either clone the repository and import the package manually, use the [Package Installation URL](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tJ8000000kaPHIAY)
|
||||
or execute the following SFDX CLI command in your terminal:
|
||||
```bash
|
||||
sf package install --package 04tJ8000000kaPHIAY --wait=10 --target-org $YOUR_ORG_ALIAS
|
||||
```
|
||||
_Replace `$YOUR_ORG_ALIAS` with the alias of your target org_
|
||||
|
||||
## Extensions pack contents
|
||||
These features are offered in this extension package:
|
||||
|
||||
@@ -112,4 +123,7 @@ Thank you for your donations!
|
||||
|
||||
| Package version | Package ID | Description |
|
||||
|-----------------------------------------------|--------------------|--------------------------------|
|
||||
| 0.1.0-2 | 04tJ8000000kaKVIAY | Created on 26/03/2026 20:07:07 |
|
||||
| 0.1.0-2 | 04tJ8000000kaKVIAY | Created on 26/03/2026 20:07:07 || 0.7.0.1 | 04tJ8000000kaKzIAI | Created on 30/03/2026 13:49:28 |
|
||||
| 0.8.0.1 | 04tJ8000000kaL4IAI | Created on 31/03/2026 11:51:16 |
|
||||
| 0.9.0.1 | 04tJ8000000kaPHIAY | Created on 13/04/2026 14:46:02 |
|
||||
| 0.9.0.1 | 04tJ8000000kaPHIAY | Created on 05/08/2026 08:36:21 |
|
||||
|
||||
+7
-6
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"packageDirectories": [
|
||||
{
|
||||
"versionName": "ver 0.1",
|
||||
"versionNumber": "0.1.0.NEXT",
|
||||
"versionName": "ver 0.10",
|
||||
"versionNumber": "0.10.0.NEXT",
|
||||
"path": "sfdx-source",
|
||||
"default": true,
|
||||
"package": "fflibApexExtensions",
|
||||
@@ -12,10 +12,11 @@
|
||||
"name": "fflib-apex-extensions",
|
||||
"namespace": "",
|
||||
"sfdcLoginUrl": "https://login.salesforce.com",
|
||||
"sourceApiVersion": "65.0",
|
||||
"sourceApiVersion": "66.0",
|
||||
"packageAliases": {
|
||||
"fflibApexExtensions": "0HoJ8000000KyjfKAC",
|
||||
"fflibApexExtensions@0.1.0-1-feature/UnlockedManagedPackage": "04tJ8000000kaKQIAY",
|
||||
"fflibApexExtensions@0.1.0-2-feature/UnlockedManagedPackage": "04tJ8000000kaKVIAY"
|
||||
"fflibApexExtensions@0.7.0-1": "04tJ8000000kaKzIAI",
|
||||
"fflibApexExtensions@0.8.0-1-apiUpgrade": "04tJ8000000kaL4IAI",
|
||||
"fflibApexExtensions@0.9.0-1-feature/genericSelector": "04tJ8000000kaPHIAY"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1078,6 +1078,29 @@ public virtual class fflib_SObjects2
|
||||
return getRecordsNotIn(sObjectField, new Set<String>{ value });
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the fflib_SObjects base implementation, which casts every value to `String` and
|
||||
* uses `String.isNotBlank` — that throws a TypeException on Date / Datetime / Number / Lookup
|
||||
* fields. This override generalises to "any non-null value, and for Strings also non-blank",
|
||||
* so the helper works for every field type.
|
||||
*
|
||||
* @param field The field to check.
|
||||
*
|
||||
* @return The records whose value for `field` is non-null (and, for Strings, non-blank).
|
||||
*/
|
||||
protected override List<SObject> getRecordsWithNonBlankFieldValues(Schema.SObjectField sObjectField)
|
||||
{
|
||||
List<SObject> result = new List<SObject>();
|
||||
for (SObject record : getRecords())
|
||||
{
|
||||
Object value = record.get(sObjectField);
|
||||
if (value == null) continue;
|
||||
if (value instanceof String && String.isBlank((String) value)) continue;
|
||||
result.add(record);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@TestVisible
|
||||
protected virtual List<SObject> getRecordsNotIn(Schema.SObjectField sObjectField, Set<String> values)
|
||||
{
|
||||
@@ -1455,4 +1478,4 @@ public virtual class fflib_SObjects2
|
||||
}
|
||||
|
||||
public class DeveloperException extends Exception { }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
/**
|
||||
* File Name: fflib_SObjectsSelector
|
||||
*
|
||||
* Generic SObject selector class
|
||||
*
|
||||
* @author architect ir. Wilhelmus G.J. Velzeboer
|
||||
*
|
||||
* Copyright (c), W.G.J. Velzeboer,
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above author notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the author nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
public with sharing class fflib_SObjectsSelector
|
||||
extends fflib_SObjectSelector {
|
||||
/**
|
||||
* The current implementation type of the service
|
||||
*/
|
||||
private static System.Type implementationType = fflib_SObjectsSelector.class;
|
||||
|
||||
/**
|
||||
* The implementation replacement for the service,
|
||||
*/
|
||||
private static fflib_SObjectsSelector implementationReplacement;
|
||||
|
||||
/**
|
||||
* The list of field that should be retrieved with each query
|
||||
*/
|
||||
private List<Schema.SObjectField> sObjectFields { get; set; }
|
||||
|
||||
/**
|
||||
* Holds the SObjectType of the records to query
|
||||
*/
|
||||
private Schema.SObjectType sObjectType { get; set; }
|
||||
|
||||
/**
|
||||
* Runs the query in System Mode, disabling FLS, CRUD & sharing rules
|
||||
*
|
||||
* @param sObjectType The SObjectType of the records to query
|
||||
* @param sObjectFields a set of SObjectFields to get each time a Quote records is queried
|
||||
*
|
||||
* @return New instance of the selector
|
||||
*/
|
||||
public static fflib_SObjectsSelector newElevatedInstance(SObjectType sObjectType, Set<SObjectField> sObjectFields) {
|
||||
fflib_SObjectsSelector selector =
|
||||
(implementationReplacement == null) ? (fflib_SObjectsSelector) implementationType.newInstance() : implementationReplacement;
|
||||
selector.setDataAccess(fflib_SObjectSelector.DataAccess.SYSTEM_MODE);
|
||||
selector.setSObjectFields(sObjectFields);
|
||||
selector.setSObjectType(sObjectType);
|
||||
return selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the query in System Mode, disabling FLS, CRUD & sharing rules
|
||||
*
|
||||
* @param sObjectType The SObjectType of the records to query
|
||||
* @param sObjectFields a set of SObjectFields to get each time a Quote records is queried
|
||||
*
|
||||
* @return New instance of the selector
|
||||
*/
|
||||
public static fflib_SObjectsSelector newElevatedInstance(SObjectType sObjectType, Set<String> sObjectFields) {
|
||||
fflib_SObjectsSelector selector =
|
||||
(implementationReplacement == null) ? (fflib_SObjectsSelector) implementationType.newInstance() : implementationReplacement;
|
||||
selector.setDataAccess(fflib_SObjectSelector.DataAccess.SYSTEM_MODE);
|
||||
selector.setSObjectFields(sObjectType, sObjectFields);
|
||||
selector.setSObjectType(sObjectType);
|
||||
return selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
* This should not be used directly by an application but only by fflib
|
||||
*/
|
||||
public fflib_SObjectsSelector() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* The fields to always include in all queries
|
||||
*
|
||||
* @return Returns a list of default fields that are always queried
|
||||
*/
|
||||
public virtual List<Schema.SObjectField> getSObjectFieldList() {
|
||||
return this.sObjectFields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the SObjectType for this selector
|
||||
*
|
||||
* @return the SObjectType of this selector
|
||||
*/
|
||||
public Schema.SObjectType getSObjectType() {
|
||||
return this.sObjectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the default implementation of the service
|
||||
*
|
||||
* @param systemType The System.Type of the replacement class
|
||||
*/
|
||||
public static void replaceWith(System.Type systemType) {
|
||||
fflib_SObjectsSelector.implementationType = systemType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the default implementation of the service
|
||||
*
|
||||
* @param replacement A replacement instance
|
||||
*
|
||||
* @see fflib_SObjectsSelector
|
||||
*/
|
||||
public static void replaceWith(fflib_SObjectsSelector replacement) {
|
||||
fflib_SObjectsSelector.implementationReplacement = replacement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries records by their record Id
|
||||
*
|
||||
* @param idSet A set of record Id values
|
||||
*
|
||||
* @return A list of SObject records
|
||||
*/
|
||||
public virtual List<SObject> selectById(Set<Id> idSet) {
|
||||
return Database.query(
|
||||
newQueryFactory()
|
||||
.setCondition('Id IN :idSet')
|
||||
.toSOQL()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries SObject records by their record Id
|
||||
*
|
||||
* @param sObjectField The Id field to query
|
||||
* @param ids A set of record Id values
|
||||
*
|
||||
* @return A list of SObject records
|
||||
*/
|
||||
public List<SObject> selectByIdField(SObjectField sObjectField, Set<Id> ids) {
|
||||
return Database.query(
|
||||
newQueryFactory()
|
||||
.setCondition(sObjectField.getDescribe().getName() + ' IN :ids')
|
||||
.toSOQL()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the list of fields that are fetched on each query
|
||||
*
|
||||
* @param sObjectFields A set of SObjectFields from the SObjectType
|
||||
*
|
||||
* @return Returns an instance of itself to allow for method chaining
|
||||
*/
|
||||
public fflib_SObjectsSelector setSObjectFields(Set<SObjectField> sObjectFields) {
|
||||
this.sObjectFields = new List<SObjectField>(sObjectFields);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the list of fields that are fetched on each query
|
||||
*
|
||||
* @param sObjectType The SObjectType of the provided fields
|
||||
* @param fieldNames A set of SObject field names
|
||||
*
|
||||
* @return Returns an instance of itself to allow for method chaining
|
||||
*/
|
||||
public fflib_SObjectsSelector setSObjectFields(SObjectType sObjectType, Set<String> fieldNames) {
|
||||
Map<String, SObjectField> sObjectFieldsByName = sObjectType.getDescribe().fields.getMap();
|
||||
|
||||
Set<SObjectField> sObjectFields = new Set<SObjectField>();
|
||||
for (String fieldName : fieldNames) {
|
||||
if (sObjectFieldsByName.containsKey(fieldName) == false) continue;
|
||||
|
||||
sObjectFields.add(sObjectFieldsByName.get(fieldName));
|
||||
}
|
||||
setSObjectFields(sObjectFields);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SObjectType of the records to query
|
||||
*
|
||||
* @param sObjectType The SObjectType of the records to query
|
||||
*
|
||||
* @return Returns an instance of itself to allow for method chaining
|
||||
*/
|
||||
public fflib_SObjectsSelector setSObjectType(SObjectType sObjectType) {
|
||||
this.sObjectType = sObjectType;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexTrigger>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -679,6 +679,30 @@ private class fflib_SObjects2Test
|
||||
System.Assert.areEqual(3, domain.selectWithShippingCountry().size());
|
||||
}
|
||||
|
||||
@IsTest
|
||||
static void itShouldReturnRecordsWithNonNullNumericField()
|
||||
{
|
||||
DomainAccounts domain = generateDomain();
|
||||
|
||||
System.Assert.areEqual(4, domain.selectWithAnnualRevenue().size());
|
||||
}
|
||||
|
||||
@IsTest
|
||||
static void itShouldReturnRecordsWithNonNullDatetimeField()
|
||||
{
|
||||
Datetime now = Datetime.now();
|
||||
DomainAccounts domain = new DomainAccounts(
|
||||
new List<Account>
|
||||
{
|
||||
(Account) fflib_MockSObjectUtil.addFieldValue(new Account(Name = 'A'), Account.CreatedDate, now),
|
||||
(Account) fflib_MockSObjectUtil.addFieldValue(new Account(Name = 'B'), Account.CreatedDate, now),
|
||||
new Account(Name = 'C')
|
||||
}
|
||||
);
|
||||
|
||||
System.Assert.areEqual(2, domain.selectWithCreatedDate().size());
|
||||
}
|
||||
|
||||
@IsTest
|
||||
static void itShouldReturnRecordsWithAllFieldValues()
|
||||
{
|
||||
@@ -845,11 +869,25 @@ private class fflib_SObjects2Test
|
||||
|
||||
public List<Account> selectWithShippingCountry()
|
||||
{
|
||||
return getRecordsWithNotBlankFieldValues(
|
||||
return getRecordsWithNonBlankFieldValues(
|
||||
Schema.Account.ShippingCountry
|
||||
);
|
||||
}
|
||||
|
||||
public List<Account> selectWithAnnualRevenue()
|
||||
{
|
||||
return getRecordsWithNonBlankFieldValues(
|
||||
Schema.Account.AnnualRevenue
|
||||
);
|
||||
}
|
||||
|
||||
public List<Account> selectWithCreatedDate()
|
||||
{
|
||||
return getRecordsWithNonBlankFieldValues(
|
||||
Schema.Account.CreatedDate
|
||||
);
|
||||
}
|
||||
|
||||
public List<Account> selectWithEmptyRecord()
|
||||
{
|
||||
return getRecordsWithAllBlankFieldValues(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>65.0</apiVersion>
|
||||
<apiVersion>66.0</apiVersion>
|
||||
<status>Active</status>
|
||||
</ApexClass>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user