Class DefaultAccountRoleService<P extends AccountRole,D extends com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware & com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable>
java.lang.Object
com.broadleafcommerce.auth.security.service.DefaultAccountRoleService<P,D>
- All Implemented Interfaces:
AccountRoleService<P>
public class DefaultAccountRoleService<P extends AccountRole,D extends com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware & com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable>
extends Object
implements AccountRoleService<P>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAccountRoleService(AccountRoleRepository<D> repository, SimplePayloadMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected SimplePayloadMapperprotected AccountRoleRepository<D>readAllByAccountIdIn(@NonNull Collection<String> accountIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read allAccountRolesfor the given account ids.org.springframework.data.domain.Page<P>readByAccountId(String accountId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ReadAccountRolesfor the given account id.Update the givenAccountRolein the database.voidupdateAll(List<? extends P> accountRoles, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Update all givenAccountRolesin the database.
-
Constructor Details
-
DefaultAccountRoleService
-
-
Method Details
-
readByAccountId
public org.springframework.data.domain.Page<P> readByAccountId(String accountId, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountRoleServiceReadAccountRolesfor the given account id. This returns allAccountRolesfrom all users that are members of the given account.- Specified by:
readByAccountIdin interfaceAccountRoleService<P extends AccountRole>- Parameters:
accountId- The id of the account to lookup roles.page- information about which page of results to return from the database.contextInfo- Context information for data tracking.- Returns:
- Page of
AccountRolesfor the given account id.
-
readAllByAccountIdIn
public List<P> readAllByAccountIdIn(@NonNull @NonNull Collection<String> accountIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountRoleServiceRead allAccountRolesfor the given account ids. This returns allAccountRolesfrom all users that are members of the given account.- Specified by:
readAllByAccountIdInin interfaceAccountRoleService<P extends AccountRole>- Parameters:
accountIds- The ids of the accounts to lookup roles for.contextInfo- Context information for data tracking.- Returns:
- List of
AccountRolesfor the given account ids.
-
replace
public P replace(P accountRole, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountRoleServiceUpdate the givenAccountRolein the database.- Specified by:
replacein interfaceAccountRoleService<P extends AccountRole>- Parameters:
accountRole- TheAccountRoleto update.contextInfo- Context information for data tracking.- Returns:
- The updated and persisted
AccountRole.
-
updateAll
public void updateAll(List<? extends P> accountRoles, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountRoleServiceUpdate all givenAccountRolesin the database.- Specified by:
updateAllin interfaceAccountRoleService<P extends AccountRole>- Parameters:
accountRoles- The list ofAccountRolesto update.contextInfo- Context information for data tracking.
-
getRepository
-
getMapper
-