Remove Sharing Mode from Dynamic Application Factories
Sharing mode is no longer required as SOQL queries can now run in USER_MODE or SYSTEM_MODE.
This commit is contained in:
+2
-4
@@ -179,8 +179,7 @@ public class fflib_DynamicDomainFactoryTest
|
||||
Type__c = 'Domain',
|
||||
BindingObject__c = '',
|
||||
BindingObjectAlternate__c = ACCOUNT_OBJECT_TYPE.getDescribe().getName(),
|
||||
ImplementationType__c = MyDomainConstructor.class.getName(),
|
||||
SharingMode__c = 'None'
|
||||
ImplementationType__c = MyDomainConstructor.class.getName()
|
||||
),
|
||||
new fflib_AppBinding__mdt(
|
||||
ApplicationPackage__c = otherApp.Id,
|
||||
@@ -188,8 +187,7 @@ public class fflib_DynamicDomainFactoryTest
|
||||
Type__c = 'Domain',
|
||||
BindingObject__c = '',
|
||||
BindingObjectAlternate__c = ACCOUNT_OBJECT_TYPE.getDescribe().getName(),
|
||||
ImplementationType__c = OtherDomainConstructor.class.getName(),
|
||||
SharingMode__c = 'None'
|
||||
ImplementationType__c = OtherDomainConstructor.class.getName()
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
+2
-4
@@ -37,8 +37,7 @@ public class fflib_DynamicSelectorFactoryTest
|
||||
|
||||
@TestVisible
|
||||
private static final fflib_DynamicSelectorFactory Selector =
|
||||
new fflib_DynamicSelectorFactory(bindingResolver)
|
||||
.setSharingMode(fflib_SharingMode.WithSharing);
|
||||
new fflib_DynamicSelectorFactory(bindingResolver);
|
||||
|
||||
private static final Type MY_SELECTOR_TYPE = fflib_DynamicSelectorFactoryTest.MySelector.class;
|
||||
|
||||
@@ -147,8 +146,7 @@ public class fflib_DynamicSelectorFactoryTest
|
||||
Type__c = 'Selector',
|
||||
BindingObject__c = '',
|
||||
BindingObjectAlternate__c = Schema.Account.SObjectType.getDescribe().getName(),
|
||||
ImplementationType__c = MY_SELECTOR_TYPE.getName(),
|
||||
SharingMode__c = 'With Sharing'
|
||||
ImplementationType__c = MY_SELECTOR_TYPE.getName()
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
-5
@@ -112,7 +112,6 @@ public class fflib_DynamicServiceFactoryTest
|
||||
result.setBindingType(fflib_AppBindingType.Service);
|
||||
result.setInterfaceType(MY_SERVICE_TYPE);
|
||||
result.setImplementationType(MY_SERVICE_TYPE);
|
||||
result.setSharingMode(fflib_SharingMode.WithSharing);
|
||||
result.setSequence(2);
|
||||
return result;
|
||||
}
|
||||
@@ -148,14 +147,12 @@ public class fflib_DynamicServiceFactoryTest
|
||||
Type__c = 'Service',
|
||||
InterfaceType__c = MY_SERVICE_INTERFACE_TYPE.getName(),
|
||||
ImplementationType__c = MY_SERVICE_TYPE.getName(),
|
||||
SharingMode__c = 'With Sharing',
|
||||
BindingSequence__c = 1
|
||||
),
|
||||
new fflib_AppBinding__mdt(
|
||||
Type__c = 'Service',
|
||||
InterfaceType__c = MY_SERVICE_INTERFACE_TYPE.getName(),
|
||||
ImplementationType__c = MY_ALT_SERVICE_TYPE.getName(),
|
||||
SharingMode__c = 'With Sharing',
|
||||
BindingSequence__c = 2
|
||||
)
|
||||
};
|
||||
@@ -172,14 +169,12 @@ public class fflib_DynamicServiceFactoryTest
|
||||
Type__c = 'Service',
|
||||
InterfaceType__c = MY_SERVICE_INTERFACE_TYPE.getName(),
|
||||
ImplementationType__c = MY_SERVICE_TYPE.getName(),
|
||||
SharingMode__c = 'With Sharing',
|
||||
BindingSequence__c = 2
|
||||
),
|
||||
new fflib_AppBinding__mdt(
|
||||
Type__c = 'Service',
|
||||
InterfaceType__c = MY_SERVICE_INTERFACE_TYPE.getName(),
|
||||
ImplementationType__c = MY_ALT_SERVICE_TYPE.getName(),
|
||||
SharingMode__c = 'With Sharing',
|
||||
BindingSequence__c = 1
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user