Skip to content

Commit

Permalink
Formatting fixes on the Organisation Service
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-baillie-ortoo committed Mar 4, 2022
1 parent 58624e0 commit a27eb51
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
public interface IOrganizationService {
public interface IOrganizationService
{
Boolean inDevOrg();
Boolean inSandbox();
String getOrgEdition();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public with sharing class OrganizationService {

public static Boolean inDevOrg()
public with sharing class OrganizationService
{
public static Boolean inDevOrg()
{
return service().inDevOrg();
}
Expand All @@ -11,11 +11,12 @@ public with sharing class OrganizationService {
}

public static String getOrgEdition()
{
return service().getOrgEdition();
}
{
return service().getOrgEdition();
}

private static IOrganizationService service() {
return (IOrganizationService)Application.SERVICE.newInstance( IOrganizationService.class );
private static IOrganizationService service()
{
return (IOrganizationService)Application.SERVICE.newInstance( IOrganizationService.class );
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public with sharing class OrganizationServiceImpl implements IOrganizationService
{
public Boolean inDevOrg()
public Boolean inDevOrg()
{
return org.OrganizationType == 'Developer Edition';
}
Expand All @@ -15,29 +15,29 @@ public with sharing class OrganizationServiceImpl implements IOrganizationServic
return org.OrganizationType;
}

private static Organization org
{
get
{
if ( org == null )
{
org = organizationSelector.selectSingleRow();
}
return org;
}
set;
}
private static Organization org
{
get
{
if ( org == null )
{
org = organizationSelector.selectSingleRow();
}
return org;
}
set;
}

private static OrganizationSelector organizationSelector
{
get
{
if ( organizationSelector == null )
{
organizationSelector = ((OrganizationSelector)Application.SELECTOR.newInstance( Organization.SobjectType ) );
}
return organizationSelector;
}
set;
}
private static OrganizationSelector organizationSelector
{
get
{
if ( organizationSelector == null )
{
organizationSelector = ((OrganizationSelector)Application.SELECTOR.newInstance( Organization.SobjectType ) );
}
return organizationSelector;
}
set;
}
}

0 comments on commit a27eb51

Please sign in to comment.