Add link to code examples

This commit is contained in:
Wim Velzeboer
2021-07-08 15:42:47 +01:00
parent c3bc63b177
commit 92988355c0
3 changed files with 13 additions and 9 deletions
+4
View File
@@ -18,6 +18,10 @@ When you rather prefer the bare overview of classes, methods and their examples,
then you can find a full overview of the methods, their signatures and description in the then you can find a full overview of the methods, their signatures and description in the
[ApexDocs](./docs/README.asciidoc). [ApexDocs](./docs/README.asciidoc).
## Example Application
You can look at
[these examples](https://github.com/wimvelzeboer/fflib-apex-extensions-samplecode)
if you like to see this extension package in action.
## Migrating from apex-commons ## Migrating from apex-commons
+4 -2
View File
@@ -20,12 +20,14 @@ interface class.
- <<constructor0, constructor: (resolver, selectorFactory)>> + - <<constructor0, constructor: (resolver, selectorFactory)>> +
== Methods == Inherited Methods
This implementation of This implementation of
link:fflib_IDomainFactory.asciidoc[fflib_IDomainFactory] link:fflib_IDomainFactory.asciidoc[fflib_IDomainFactory]
Does not add any new public or protected methods other than the following methods Does not add any new public or protected methods other than the following methods
which are defined in the interface which are defined in the interface
link:fflib_IDomainFactory.asciidoc[fflib_IDomainFactory]. link:fflib_IDomainFactory.asciidoc[fflib_IDomainFactory]
and in the abstract class
link:fflib_DynamicAppFactory[fflib_DynamicAppFactory].
- link:fflib_IDomainFactory.asciidoc#newInstance1[newInstance(Set<Id> recordIds)] + - link:fflib_IDomainFactory.asciidoc#newInstance1[newInstance(Set<Id> recordIds)] +
Dynamically constructs an instance of a Domain class for the given record Ids Dynamically constructs an instance of a Domain class for the given record Ids
+5 -7
View File
@@ -54,10 +54,9 @@ public class Application
public static final fflib_ISelectorFactory Selector = public static final fflib_ISelectorFactory Selector =
new fflib_DynamicSelectorFactory(bindingResolver); new fflib_DynamicSelectorFactory(bindingResolver);
public static final fflib_ISelectorFactory WithoutSharingSelector = public static final fflib_ISelectorFactory ElevatedSelector =
new fflib_DynamicSelectorFactory( new fflib_DynamicSelectorFactory(bindingResolver)
bindingResolver.bySharingMode(fflib_SharingMode.WithoutSharing) .setSharingMode(fflib_SharingMode.WithSharing);
);
} }
``` ```
@@ -69,13 +68,12 @@ public virtual inherited sharing class AccountsSelector
{ {
public static IAccountsSelector newInstance() public static IAccountsSelector newInstance()
{ {
return (IAccountsSelector) Application.Selector.newInstance(Schema.Account.SObjectType); return (IAccountsSelector) Application.Selector.newInstance(Account.SObjectType);
} }
public static IAccountsSelector newWithoutSharingInstance() public static IAccountsSelector newWithoutSharingInstance()
{ {
return (IAccountsSelector) Application.WithoutSharingSelector return (IAccountsSelector) Application.ElevatedSelector.newInstance(Account.SObjectType);
.newInstance(Schema.Account.SObjectType);
} }
public AccountsSelector() public AccountsSelector()