Skip to content

Commit d8e6049

Browse files
committed
initial commit of BaseRepo
1 parent cdd214a commit d8e6049

8 files changed

Lines changed: 1330 additions & 1 deletion

File tree

docs/BaseRepo.md

Lines changed: 864 additions & 0 deletions
Large diffs are not rendered by default.

docs/BaseRepoTests.md

Whitespace-only changes.

docs/RestLibApiCall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Integer
3636

3737
### `methodValue`
3838

39-
stores the httpverb defined in the enum
39+
stores the http verb defined in the enum
4040

4141
#### Signature
4242

docs/home.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ FeatureFlag flag class to facilitate proper unit testing. (and just good design)
1313

1414
## Miscellaneous
1515

16+
### [BaseRepo](miscellaneous/BaseRepo.md)
17+
18+
Virtual base repository that every Repository must extend from. This class provides base implementations for common repository CRUD operations.
19+
More specific implementations must be added to the extending classes.
20+
No SObject specific queries are to be added to this base class. SObject specific queries are to be added to the extending classes.
21+
All SObject specific queries are to be done WITH USER_MODE.
22+
All SObject specific queries are to contain a Limit Statement.
23+
24+
There are now overloads provided for all DML operations that allow unsafe DML operations to be performed
25+
but they require certain criteria be met as follows.
26+
27+
1. Create an instance of this class using the overloaded constructor to permit unsafe DML operations.
28+
2. The calling code must provide an
29+
30+
### [BaseRepoTests](miscellaneous/BaseRepoTests.md)
31+
1632
### [ULID](miscellaneous/ULID.md)
1733

1834
This class implements the ULID spec in Apex.

force-app/main/default/classes/Repository/BaseRepo.cls

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>58.0</apiVersion>
4+
<status>Active</status>
5+
</ApexClass>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public with sharing class BaseRepoTests {
2+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>58.0</apiVersion>
4+
<status>Active</status>
5+
</ApexClass>

0 commit comments

Comments
 (0)